fix column.create() properly
This commit is contained in:
parent
2e28635b0b
commit
ca5d59910a
@ -8,7 +8,8 @@ Fixed Bugs
|
|||||||
******************
|
******************
|
||||||
|
|
||||||
- docs/_build is excluded from source tarball builds
|
- docs/_build is excluded from source tarball builds
|
||||||
|
- use table.append_column() instead of column._set_parent() in
|
||||||
|
ChangesetColumn.add_to_table()
|
||||||
|
|
||||||
0.7 (2011-05-27)
|
0.7 (2011-05-27)
|
||||||
---------------------------
|
---------------------------
|
||||||
|
@ -555,6 +555,9 @@ populated with defaults
|
|||||||
|
|
||||||
def add_to_table(self, table):
|
def add_to_table(self, table):
|
||||||
if table is not None and self.table is None:
|
if table is not None and self.table is None:
|
||||||
|
if SQLA_07:
|
||||||
|
table.append_column(self)
|
||||||
|
else:
|
||||||
self._set_parent(table)
|
self._set_parent(table)
|
||||||
|
|
||||||
def _col_name_in_constraint(self,cons,name):
|
def _col_name_in_constraint(self,cons,name):
|
||||||
|
@ -169,8 +169,6 @@ class TestAddDropColumn(fixture.DB):
|
|||||||
|
|
||||||
# create column with fk
|
# create column with fk
|
||||||
col = Column('data', Integer, ForeignKey(reftable.c.id))
|
col = Column('data', Integer, ForeignKey(reftable.c.id))
|
||||||
if SQLA_07:
|
|
||||||
self.table.append_column(col)
|
|
||||||
col.create(self.table)
|
col.create(self.table)
|
||||||
|
|
||||||
# check if constraint is added
|
# check if constraint is added
|
||||||
|
Loading…
x
Reference in New Issue
Block a user