From: Mike Bayer Date: Sun, 12 Feb 2012 22:41:27 +0000 (-0500) Subject: - [bug] drop_index() ensures a dummy column X-Git-Tag: rel_0_2_2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a6e05c91846119398cacb3240a00f135bdc4866;p=thirdparty%2Fsqlalchemy%2Falembic.git - [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. --- diff --git a/CHANGES b/CHANGES index 5fbd3bcc..7c27ecf7 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,10 @@ 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, diff --git a/alembic/operations.py b/alembic/operations.py index 22f260c6..53b65dca 100644 --- a/alembic/operations.py +++ b/alembic/operations.py @@ -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"""