You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a migration starts with custom table names which have foreign keys to other app; that then get renamed to django default tables later on, the flush command breaks.
The full error: cannot truncate a table referenced in a foreign key constraint
DETAIL: Table "table_A" references "table_B".
HINT: Truncate table "table_A" at the same time, or use TRUNCATE ... CASCADE.
The error is caused perhaps by django's own code, since the flush command doesn't add the custom table names to the list of tables to flush. Setting only_django to False will fix the issue since the introspection module will correctly list lal the tables.
The text was updated successfully, but these errors were encountered:
I've written the bones of the type of setup here: https://inkscape.org/en/gallery/item/5361/ but the error from that site in both sqlite3 and psql is about content types needing to be created. I'll try and tweak the site until I have a happy time.
When a migration starts with custom table names which have foreign keys to other app; that then get renamed to django default tables later on, the flush command breaks.
The full error: cannot truncate a table referenced in a foreign key constraint
DETAIL: Table "table_A" references "table_B".
HINT: Truncate table "table_A" at the same time, or use TRUNCATE ... CASCADE.
The error is caused perhaps by django's own code, since the flush command doesn't add the custom table names to the list of tables to flush. Setting only_django to False will fix the issue since the introspection module will correctly list lal the tables.
The text was updated successfully, but these errors were encountered: