From 5a6e05c91846119398cacb3240a00f135bdc4866 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 12 Feb 2012 17:41:27 -0500 Subject: [PATCH] - [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. --- CHANGES | 4 ++++ alembic/operations.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) 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""" -- 2.47.3