]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
- [bug] drop_index() ensures a dummy column
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 12 Feb 2012 22:41:27 +0000 (17:41 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 12 Feb 2012 22:41:27 +0000 (17:41 -0500)
  is added when it calls "Index", as SQLAlchemy
  0.7.6 will warn on index with no column names.

CHANGES
alembic/operations.py

diff --git a/CHANGES b/CHANGES
index 5fbd3bcc8ec677bbd6f29c295025b4ca0e489b14..7c27ecf76b04cbf97818c3ba768fe6c7ff91ac16 100644 (file)
--- a/CHANGES
+++ b/CHANGES
   get the Engine from now.  courtesy 
   Marcin Kuzminski [#30]
 
+- [bug] drop_index() ensures a dummy column
+  is added when it calls "Index", as SQLAlchemy
+  0.7.6 will warn on index with no column names.
+
 0.2.1
 =====
 - [bug] Fixed the generation of CHECK constraint,
index 22f260c6d55e6abfe570f68caa46637ffb4275e9..53b65dca01fd783776ca330369750e15228bbd60 100644 (file)
@@ -522,7 +522,9 @@ class Operations(object):
             drop_index("accounts")
 
         """
-        self.impl.drop_index(self._index(name, 'foo', []))
+        # need a dummy column name here since SQLAlchemy
+        # 0.7.6 and further raises on Index with no columns
+        self.impl.drop_index(self._index(name, 'foo', ['x']))
 
     def drop_constraint(self, name, tablename):
         """Drop a constraint of the given name"""