Fix database upgrade from a new database

This fixes the problem where running "mistral-db-manage upgrade heads" on a
new database result in error with workflow_input_hash index does not exist.

Change-Id: I560b2b78d11cd3fd4ae9c8606e4336e87b22ef27
Closes-Bug: #1519929
This commit is contained in:
Winson Chan 2015-11-25 20:28:42 +00:00 committed by hardik
parent edeb6fe67c
commit 477364a4d2

View File

@ -34,8 +34,7 @@ def upgrade():
'cron_triggers_v2',
sa.Column('first_execution_time', sa.DateTime(), nullable=True)
)
op.drop_index('workflow_input_hash', table_name='cron_triggers_v2')
op.drop_index('workflow_input_hash_2', table_name='cron_triggers_v2')
op.create_unique_constraint(
None,
'cron_triggers_v2', [