Use recreate='auto' in storage_states migration

Instead of forcing the table recreation, rely on alembic to do the right
thing.

When using PostgreSQL, using "recreate='always'" prevents the migration
from happening correctly. It errors out with an exception and the table
is not present when checking the database directly.

Change-Id: I17f0e8c26b796885c6f7ca4fd5c53cd917c5f2ed
Story: 2008306
Task: 41193
This commit is contained in:
Max Gautier 2021-02-03 18:34:41 +01:00 committed by Pierre Riteau
parent b0d5e455fc
commit c248af3ecb

View File

@ -37,7 +37,7 @@ def upgrade():
with op.batch_alter_table(name,
copy_from=table,
recreate='always') as batch_op:
recreate='auto') as batch_op:
batch_op.alter_column('identifier')
batch_op.create_unique_constraint(
'uq_cloudkitty_storage_states_identifier',