[alembic] Alembic operations require keywords only arguments

Since [1] (release 1.11.0), the Alembic operations "now enforce
keyword-only arguments as passed as keyword and not positionally"
(from the commit message).

This change is compatible with the previous versions (as confirmed
in the CI).

[1]df75e85489

Closes-Bug: #2019948
Change-Id: I71f59da65edc163aa5891cf0b0d9768d2538b7a7
This commit is contained in:
Rodolfo Alonso Hernandez 2023-05-17 12:12:06 +02:00 committed by Rodolfo Alonso
parent bf54f03ce5
commit 513ea649be

View File

@ -106,7 +106,7 @@ def recreate_index(index, table_name):
old_name = index['name']
new_name = old_name.replace('tenant', 'project')
op.drop_index(op.f(old_name), table_name)
op.drop_index(index_name=op.f(old_name), table_name=table_name)
op.create_index(new_name, table_name, ['project_id'])