- changed component to sql
- changed status to resolved
- changed title to CHECK CONSTRAINT syntax fails
CHECK CONSTRAINT syntax fails
Issue #464
resolved
This fails (sqlite3 SA 0.3.4):
from sqlalchemy import *
db = create_engine('sqlite:///test.db')
metadata = BoundMetaData(db)
tab = Table('x', metadata,
Column('y', Integer, CheckConstraint('y=1')),
Column('z', String(10))
)
tab.create()
The SQL it produces is:
create table x(
y integer, check (y=1),
z varchar(10)
)
the comma after 'integer' breaks it, i.e. the following sql works:
create table x(
y integer check (y=1),
z varchar(10)
)
Comments (1)
-
repo owner - Log in to comment
the column-based check syntax was broken across the board. fixed in changeset:2333.