I'm trying to migrate mysql
database to postgres
using pgloader.
Some tables in the current mysql
database have foreign keys, but referential integrity is broken (based on data in those tables). I need to ignore FK constraint for those tables.
There is an option to disable foreign keys for all tables while migrating the database
WITH no foreign keys
But I need to disable FK-s only for a specified list of tables and preserve FK-s for all other tables. I can't find anything related to this case in the documentation.
How it could be achieved?
The only option I've found for now - is to migrate the database in two steps:
- migrate all tables excluding those for which FK-s should be ignored
- migrate only tables for which FK-s should be ignored with
no foreign keys
option
Is there a simpler way?