I have some tables in my database that use foreign keys, if I use cockroach dump to dump the entire database and then try to restore it locally (on to a cockroach DB instance) I get errors along the lines of:
Error: pq: referenced table "auth_rule" not found Failed running "sql"
If I look at the dumped SQL the auth_rule table above is dumped AFTER the table that references it? Am I missing something? How can I restore these dumps without manually changing the ordering of the CREATE TABLE statements?