summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-01-07 00:24:30 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2010-01-07 00:24:30 +0000
commit7ead46cbf27835408bc85513f5f669274037e463 (patch)
tree56ca0a08009cc10f96b8d49185b42188674edf2c /lib/sqlalchemy
parentf07297e82d56d3ea155578ecff9cdae691b95de5 (diff)
downloadsqlalchemy-7ead46cbf27835408bc85513f5f669274037e463.tar.gz
merge r6616 of 0.5 branch, allow DefaultGenerators as "default" and "onupdate"
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/schema.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py
index 8761b7be6..86ef9c825 100644
--- a/lib/sqlalchemy/schema.py
+++ b/lib/sqlalchemy/schema.py
@@ -670,7 +670,10 @@ class Column(SchemaItem, expression.ColumnClause):
args.append(DefaultClause(self.server_default))
if self.onupdate is not None:
- args.append(ColumnDefault(self.onupdate, for_update=True))
+ if isinstance(self.onupdate, (ColumnDefault, Sequence)):
+ args.append(self.onupdate)
+ else:
+ args.append(ColumnDefault(self.onupdate, for_update=True))
if self.server_onupdate is not None:
if isinstance(self.server_onupdate, FetchedValue):