]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Update documentation for create_index parameters
authorLucas Taylor <ltaylor.volks@gmail.com>
Fri, 10 Oct 2014 19:21:18 +0000 (14:21 -0500)
committerLucas Taylor <ltaylor.volks@gmail.com>
Fri, 10 Oct 2014 19:23:05 +0000 (14:23 -0500)
alembic/operations.py

index 2ea54cb3a1d71aed8bf5f1947a020e177f502889..a324a24bd82cd8c5c13883b7f548fa46782a0458 100644 (file)
@@ -759,7 +759,8 @@ class Operations(object):
             self._table(name, **kw)
         )
 
-    def create_index(self, name, table_name, columns, schema=None, **kw):
+    def create_index(self, name, table_name, columns, schema=None,
+                     unique=False, quote=None, **kw):
         """Issue a "create index" instruction using the current
         migration context.
 
@@ -795,10 +796,26 @@ class Operations(object):
 
          .. versionadded:: 0.4.0
 
+        :param unique: If True, create a unique index.
+
+        :param quote:
+            Force quoting of this column's name on or off, corresponding
+            to ``True`` or ``False``. When left at its default
+            of ``None``, the column identifier will be quoted according to
+            whether the name is case sensitive (identifiers with at least one
+            upper case character are treated as case sensitive), or if it's a
+            reserved word. This flag is only needed to force quoting of a
+            reserved word which is not known by the SQLAlchemy dialect.
+
+        :param \**kw: Additional keyword arguments not mentioned above are
+            dialect specific, and passed in the form ``<dialectname>_<argname>``.
+            See the documentation regarding an individual dialect at
+            :ref:`dialect_toplevel` for detail on documented arguments.
         """
 
         self.impl.create_index(
-            self._index(name, table_name, columns, schema=schema, **kw)
+            self._index(name, table_name, columns, schema=schema,
+                        unique=unique, quote=quote, **kw)
         )
 
     @util._with_legacy_names([('tablename', 'table_name')])