diff options
author | Federico Caselli <cfederico87@gmail.com> | 2022-07-14 17:19:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2022-07-14 17:19:43 +0000 |
commit | 54d5953be781b1d213557940c6f5960a8d1068dc (patch) | |
tree | 5c5386ec50d3e5c398589c4d40c178786c8f15e9 /alembic/ddl | |
parent | 70cc5ab99300217dfab5439ae911fc7301fa63fa (diff) | |
parent | ba8e22b2e29abcbfeac8a25e289191da0e7217c3 (diff) | |
download | alembic-54d5953be781b1d213557940c6f5960a8d1068dc.tar.gz |
Merge "Ignore reflected expression based indexes" into main
Diffstat (limited to 'alembic/ddl')
-rw-r--r-- | alembic/ddl/postgresql.py | 8 |
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) |