foreign key constraint violations and relation does not exist errors when restoring from production
toomanyjoes opened this issue · 0 comments
Help us track down and resolve parity problems faster with this template.
What command did you execute?
staging restore-from production
What did you expect to happen?
Cleanly restore production backup to staging environment
What actually happened?
foreign key constraint violations and relation does not exist errors
I don't think triggers and tables are being created in the right order, a trigger is created referencing a table that doesn't yet exist and a foreign key constraint is created on a table with data before the corresponding data exists in the foreign key table.
I realize this isn't necessarily a parity problem but does parity have some arguments that may be able to correct this?
Does parity have some kind of --clean option to just completely delete the target db before restoring?