[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: Ic5e7790377668d83be2cebbba8f6bfa09f7cee5e
This commit is contained in:
parent
0959e452d3
commit
43c756d728
@ -132,7 +132,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'])
|
||||
|
||||
|
||||
|
@ -99,7 +99,7 @@ def recreate_index(table):
|
||||
for idx in (idx for idx in indexes if idx['name'] == index_name):
|
||||
old_name = idx['name']
|
||||
new_name = old_name.replace('target_tenant', 'target_project')
|
||||
op.drop_index(op.f(old_name), table)
|
||||
op.drop_index(index_name=op.f(old_name), table_name=table)
|
||||
op.create_index(new_name, table, ['target_project'])
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user