- [bug] Fixed bug whereby create_unique_constraint()

would include in the constraint columns that
  are added to all Table objects using events,
  externally to the generation of the constraint.
This commit is contained in:
Mike Bayer
2012-04-26 18:07:06 -04:00
parent 2747894d2c
commit 22c36646b8
3 changed files with 22 additions and 1 deletions

View File

@@ -74,7 +74,7 @@ class Operations(object):
t = schema.Table(source, schema.MetaData(),
*[schema.Column(n, NULLTYPE) for n in local_cols])
kw['name'] = name
uq = schema.UniqueConstraint(*t.c, **kw)
uq = schema.UniqueConstraint(*[t.c[n] for n in local_cols], **kw)
# TODO: need event tests to ensure the event
# is fired off here
t.append_constraint(uq)