In a suitable sqlite version, we can enforce foreign key constraint by ‘PRAGMA foreign_keys = ON’. However user can not log in a database every time when making a connection. So I wonder how can we make it working in a migration script in sqlalchemy/alembic? Thanks very much!
In a suitable sqlite version, we can enforce foreign key constraint by ‘PRAGMA foreign_keys
Share
See Foreign Key Support from SA SQLite documentation: