render inline CHECK constraint for ADD COLUMN on sqlite #98
Migrated issue, originally created by Márcio Moreira (@arqeco)
I´ve tried without success to add a boolean column to a sqlite file.
File "C:\Python27\lib\site-packages\sqlalchemy\engine\default.py", line 331, in do_execute
The only way it worked was changing
I am new to sqlalchemy and databases in general. Is it the create_constraint=False mandatory for Sqlite databases in alembic?
The text was updated successfully, but these errors were encountered:
Michael Bayer (@zzzeek) wrote:
I'd say you've had success as just using that flag allows it to skip that part of SQLite ALTER which is not supported. Until 0.4.2 comes out that is the workaround.
SQLite has very little support for ALTER and schema migrations. In this case, SQLAlchemy itself doesn't support the column-inline CHECK syntax SQLite is requiring, so for now the CHECK constraint is skipped in b3bc2d8.
This ticket needs to stay open because theoretically we can support the addition of the CHECK constraint as well but SQLAlchemy itself would need some changes to handle this.