AnatolyUss/nmig

--[populateTableWorker] error: insert or update on table "abc" violates foreign key constraint

Closed this issue · 4 comments

hi!

As this is a migration, it is save to say that the data is consistent, so it would be a good idea to disable triggers on each table before inserting the data, once all data has been migrated, enable all triggers as suggested here: https://stackoverflow.com/a/38113838/1917300

Maybe I'm missing something?

Hi Alejandro,
Thanks for posting the issue.
The data transfer happens before enabling of keys, unless you're migrating the data into a preset schema.
Could you send me your configuration (/nmig/config/config.json)?

  • Connection details may be excluded.

I'm using a preset schema. I'll send the config when I get home. thanks!

EDIT: I remember only changing the connection details and adding "*" for preset tables. Other than that, config is the same

Hi,
The issue seems to be fixed.
Please, use the latest release (v4.0.2).