It would seem that it needs to be int
EDIT: I’ve made sure all bigint
s are converted to int
s when migrated into MySQL, however, now I’m getting the following error:
Dumping table reps
while writing data file: while dumping table reps: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'iteration,score,should_repeat,updated_at,user_id from reps' at line 1
Pretty certain this error originates here: dgraph/dgraph/cmd/migrate/dump.go at 98f68280ef84a947dbd722069d59e2f892e4c040 · dgraph-io/dgraph · GitHub
If I run the query manually in PHPMyAdmin I don’t have any problems:
EDIT:
- Having a column named
interval
seemed to cause the SQL error above, I renamed it and the issue went away.
- I experienced another error:
Dumping table flashcard_sides
panic: detected unsupported type unknown on column content
goroutine 1 [running]:
github.com/dgraph-io/dgraph/x.Panic(...)
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/x/error.go:81
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.getColumnValues(0xc00028e400, 0x6, 0x8, 0xc0004d6040, 0x6, 0x8, 0xc000192000, 0x8, 0xc000192000, 0x0, ...)
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/utils.go:123 +0x60c
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.(*dumpMeta).dumpTable(0xc0000967d0, 0xc0002a6060, 0xf, 0x0, 0x0)
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/dump.go:113 +0x5c5
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.(*dumpMeta).dumpTables(0xc0000967d0, 0x0, 0x0)
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/dump.go:73 +0x165
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.generateSchemaAndData(0xc0000967d0, 0x7ffeefbff5a2, 0xa, 0x7ffeefbff5bb, 0x7, 0x0, 0x0)
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/run.go:179 +0x125
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.run(0xc00013cfc0, 0x0, 0x0)
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/run.go:123 +0x668
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.init.0.func1(0xc000674c80, 0xc0001de0e0, 0x0, 0xe)
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/run.go:44 +0x31
github.com/spf13/cobra.(*Command).execute(0xc000674c80, 0xc0001de000, 0xe, 0xe, 0xc000674c80, 0xc0001de000)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x5ccd640, 0x0, 0x0, 0x0)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x30b
github.com/spf13/cobra.(*Command).Execute(...)
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute()
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/root.go:72 +0x85
main.main()
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/main.go:102 +0x172
Changing the db to utf8_unicode_ci
seemed to make this error go away:
Now experiencing the following error:
Dumping table constraints flashcards
ignoring the constraint because of error when getting ref label: found invalid nullint
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.getValue
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/table_guide.go:172
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.createLabel
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/table_guide.go:204
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.(*sqlRow).getRefLabelFromConstraint
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/dump.go:283
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.(*dumpMeta).outputConstraints
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/dump.go:210
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.(*dumpMeta).dumpTableConstraints
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/dump.go:159
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.(*dumpMeta).dumpTables
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/dump.go:80
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.generateSchemaAndData
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/run.go:179
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.run
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/run.go:123
github.com/dgraph-io/dgraph/dgraph/cmd/migrate.init.0.func1
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/migrate/run.go:44
github.com/spf13/cobra.(*Command).execute
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/cmd/root.go:72
main.main
/private/tmp/dgraph-20210224-74311-389b6w/dgraph-20.11.2/dgraph/main.go:102
runtime.main
/usr/local/Cellar/go/1.16/libexec/src/runtime/proc.go:225
runtime.goexit
/usr/local/Cellar/go/1.16/libexec/src/runtime/asm_amd64.s:1371
ignoring the constraint because of error when getting ref label: found invalid nullint
This error spits out an infinite amount of traces at an insanely fast rate, presumably because Go is extremely fast and the script is stuck in a loop.
Relevant line of code: dgraph/dgraph/cmd/migrate/table_guide.go at 98f68280ef84a947dbd722069d59e2f892e4c040 · dgraph-io/dgraph · GitHub
EDIT: You know what, I think the last one isn’t actually a problem, the stack trace is just being logged to stdout
because the err
is included as an argument to Println
statement on this line: dgraph/dgraph/cmd/migrate/dump.go at 98f68280ef84a947dbd722069d59e2f892e4c040 · dgraph-io/dgraph · GitHub
I let it run and it seems to have worked. Just need to figure out how to upload it to Slash GraphQL.