[Sqlalchemy-tickets] Issue #3023: inconsistent behavior of nullable with PrimaryKeyConstraint (zzze
Brought to you by:
zzzeek
|
From: Mike B. <iss...@bi...> - 2014-04-15 13:42:46
|
New issue 3023: inconsistent behavior of nullable with PrimaryKeyConstraint https://bitbucket.org/zzzeek/sqlalchemy/issue/3023/inconsistent-behavior-of-nullable-with Mike Bayer: this is fairly egregious, breaks alembic as one might expect ``` #!python from sqlalchemy import * m = MetaData() t1 = Table('t1', m, Column('x', Integer), PrimaryKeyConstraint('x')) t2 = Table('t2', m, Column('x', Integer, primary_key=True)) assert list(t1.primary_key) == [t1.c.x] assert list(t2.primary_key) == [t2.c.x] assert t1.c.x.primary_key assert t2.c.x.primary_key assert not t2.c.x.nullable assert not t1.c.x.nullable ``` |