]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
- an adjustment to the logic for #282 - if the index we see here
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Mar 2015 20:14:21 +0000 (16:14 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Mar 2015 20:14:21 +0000 (16:14 -0400)
*is* in conn_indexes_by_name, then obviously we should leave it in.

alembic/ddl/postgresql.py

index 10026876ad8157ab49a0eb27c97c0e3e6aecbb5a..9f97b3450f1345436c060526a0d6d07056283fd1 100644 (file)
@@ -105,6 +105,8 @@ class PostgresqlImpl(DefaultImpl):
             conn_indexes.remove(ix)
 
         for idx in list(metadata_indexes):
+            if idx.name in conn_indexes_by_name:
+                continue
             if compat.sqla_08:
                 exprs = idx.expressions
             else: