summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/schema.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-06-24 12:25:07 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-06-24 12:25:28 -0400
commit02b0af4f7ce2e9c8135c7983c13b3a7844b69740 (patch)
tree9d97e5d491293c9143c8f5905c8d6b4fdf1841dd /lib/sqlalchemy/sql/schema.py
parentf10eb28d90cbf73f4757897f52bf26722f98372e (diff)
downloadsqlalchemy-02b0af4f7ce2e9c8135c7983c13b3a7844b69740.tar.gz
- write some really complete docs on MSSQL autoincrement, fixes #3094
Diffstat (limited to 'lib/sqlalchemy/sql/schema.py')
-rw-r--r--lib/sqlalchemy/sql/schema.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py
index 13461f3f3..121f6da77 100644
--- a/lib/sqlalchemy/sql/schema.py
+++ b/lib/sqlalchemy/sql/schema.py
@@ -840,10 +840,17 @@ class Column(SchemaItem, ColumnClause):
* Part of the primary key
- * Are not referenced by any foreign keys, unless
- the value is specified as ``'ignore_fk'``
+ * Not refering to another column via :class:`.ForeignKey`, unless
+ the value is specified as ``'ignore_fk'``::
- .. versionadded:: 0.7.4
+ # turn on autoincrement for this column despite
+ # the ForeignKey()
+ Column('id', ForeignKey('other.id'),
+ primary_key=True, autoincrement='ignore_fk')
+
+ It is typically not desirable to have "autoincrement" enabled
+ on such a column as its value intends to mirror that of a
+ primary key column elsewhere.
* have no server side or client side defaults (with the exception
of Postgresql SERIAL).