summaryrefslogtreecommitdiff
path: root/alembic/ddl
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2022-07-14 17:19:43 +0000
committerGerrit Code Review <gerrit@ci3.zzzcomputing.com>2022-07-14 17:19:43 +0000
commit54d5953be781b1d213557940c6f5960a8d1068dc (patch)
tree5c5386ec50d3e5c398589c4d40c178786c8f15e9 /alembic/ddl
parent70cc5ab99300217dfab5439ae911fc7301fa63fa (diff)
parentba8e22b2e29abcbfeac8a25e289191da0e7217c3 (diff)
downloadalembic-54d5953be781b1d213557940c6f5960a8d1068dc.tar.gz
Merge "Ignore reflected expression based indexes" into main
Diffstat (limited to 'alembic/ddl')
-rw-r--r--alembic/ddl/postgresql.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/alembic/ddl/postgresql.py b/alembic/ddl/postgresql.py
index 019eb3c..5d93803 100644
--- a/alembic/ddl/postgresql.py
+++ b/alembic/ddl/postgresql.py
@@ -249,9 +249,13 @@ class PostgresqlImpl(DefaultImpl):
while isinstance(expr, UnaryExpression):
expr = expr.element
if not isinstance(expr, Column):
+ if sqla_compat.sqla_2:
+ msg = ""
+ else:
+ msg = "; not supported by SQLAlchemy reflection"
util.warn(
- "autogenerate skipping functional index %s; "
- "not supported by SQLAlchemy reflection" % idx.name
+ "autogenerate skipping functional index "
+ f"{idx.name!r}{msg}"
)
metadata_indexes.discard(idx)