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
Creating and running the migrations from models works like a charm (thank you!), but the migration reversion is broken when foreign key constraints apply. The generated actions summary shows that the first tables created are ones with no dependencies, and the ones created following that use those as dependencies (this makes sense).
Here's an example structure:
However, it appears that the order in which tables are dropped does not match this. Instead, it goes alphabetically (either implicitly, because of how files are sorted in the file system, or explicitly).
Here's a small example of the rollbackCommands applied to:
For migration reversion to work appropriately, first the tables with dependencies must be dropped. If reversion happens in the reverse order they were created, this problem would be solved.
The text was updated successfully, but these errors were encountered:
Creating and running the migrations from models works like a charm (thank you!), but the migration reversion is broken when foreign key constraints apply. The generated actions summary shows that the first tables created are ones with no dependencies, and the ones created following that use those as dependencies (this makes sense).
Here's an example structure:
However, it appears that the order in which tables are dropped does not match this. Instead, it goes alphabetically (either implicitly, because of how files are sorted in the file system, or explicitly).
Here's a small example of the rollbackCommands applied to:
For migration reversion to work appropriately, first the tables with dependencies must be dropped. If reversion happens in the reverse order they were created, this problem would be solved.
The text was updated successfully, but these errors were encountered: