Closed ibraheemalayan closed 2 years ago
hi this is a known issue in #326 . There's no fix planned at this time so you will need to manually alter the CREATE TABLE statements to add the foreign key constraints afterwards using op.create_foreign_key()
in your migration scripts.
Describe the bug auto generating migration scripts returns a script that doesn't work. when upgrading the database I get undefined table error.
Expected behavior the autogenerated script should order the table creation commands in the correct dependency order
Code
models.py
migration_script.py
Error
You can notice that the table image has to be created before the table category to resolve the issue
Versions.