From: Mike Bayer Date: Mon, 5 May 2008 14:59:07 +0000 (+0000) Subject: - Column.copy() respects the value of "autoincrement", X-Git-Tag: rel_0_5beta1~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc5ab50a4354da3ea1f98cd2c35fbc0a418ad828;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Column.copy() respects the value of "autoincrement", fixes usage with Migrate [ticket:1021] --- diff --git a/CHANGES b/CHANGES index 989a960e49..8e39524194 100644 --- a/CHANGES +++ b/CHANGES @@ -75,6 +75,9 @@ CHANGES - improved behavior of text() expressions when used as FROM clauses, such as select().select_from(text("sometext")) [ticket:1014] + + - Column.copy() respects the value of "autoincrement", + fixes usage with Migrate [ticket:1021] - engines - Pool listeners can now be provided as a dictionary of diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py index 22df6b41a5..6439d84412 100644 --- a/lib/sqlalchemy/schema.py +++ b/lib/sqlalchemy/schema.py @@ -634,7 +634,7 @@ class Column(SchemaItem, expression._ColumnClause): This is used in ``Table.tometadata``. """ - return Column(self.name, self.type, self.default, key = self.key, primary_key = self.primary_key, nullable = self.nullable, _is_oid = self._is_oid, quote=self.quote, index=self.index, *[c.copy() for c in self.constraints]) + return Column(self.name, self.type, self.default, key = self.key, primary_key = self.primary_key, nullable = self.nullable, _is_oid = self._is_oid, quote=self.quote, index=self.index, autoincrement=self.autoincrement, *[c.copy() for c in self.constraints]) def _make_proxy(self, selectable, name = None): """Create a *proxy* for this column.