Closed rlleshi closed 2 years ago
Flask-Migrate does not create migrations, it just provides the integration with Flask. This discussion belongs in Alembic.
I believe you are confusing SQLAlchemy-level constraints, which do not need to be preserved in migration files, with database-level constraints, which do. But you may want to ask over in the Alembic project if you have any concerns or anything isn't working.
Whenever I make a new migration
flask migrate
somehow detects thecascade
constraint of any property in the database as a change and proceeds to drop it in the migration file.It drops & recreates the foreign key, thus removing the
cascade
constraint.