fixed the downgrade in new migration w/ burnettk
This commit is contained in:
parent
683308da54
commit
596e3d580d
|
@ -53,10 +53,14 @@ if [[ "${1:-}" == "clean" ]]; then
|
||||||
docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_unit_testing -c "create database spiffworkflow_backend_local_development;"
|
docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_unit_testing -c "create database spiffworkflow_backend_local_development;"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
tasks="$tasks upgrade"
|
||||||
elif [[ "${1:-}" == "migrate" ]]; then
|
elif [[ "${1:-}" == "migrate" ]]; then
|
||||||
tasks="$tasks migrate"
|
tasks="$tasks migrate"
|
||||||
|
elif [[ "${1:-}" == "downgrade" ]]; then
|
||||||
|
tasks="$tasks downgrade"
|
||||||
|
else
|
||||||
|
tasks="$tasks upgrade"
|
||||||
fi
|
fi
|
||||||
tasks="$tasks upgrade"
|
|
||||||
|
|
||||||
if [[ "${SPIFFWORKFLOW_BACKEND_DATABASE_TYPE:-mysql}" == "mysql" ]]; then
|
if [[ "${SPIFFWORKFLOW_BACKEND_DATABASE_TYPE:-mysql}" == "mysql" ]]; then
|
||||||
mysql -uroot -e "CREATE DATABASE IF NOT EXISTS spiffworkflow_backend_local_development"
|
mysql -uroot -e "CREATE DATABASE IF NOT EXISTS spiffworkflow_backend_local_development"
|
||||||
|
|
|
@ -41,8 +41,8 @@ def upgrade():
|
||||||
def downgrade():
|
def downgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
op.drop_column('spiff_step_details', 'delta_json')
|
op.drop_column('spiff_step_details', 'delta_json')
|
||||||
op.drop_constraint(None, 'process_instance', type_='foreignkey')
|
op.drop_constraint('process_instance_ibfk_3', 'process_instance', type_='foreignkey')
|
||||||
op.drop_constraint(None, 'process_instance', type_='foreignkey')
|
op.drop_constraint('process_instance_ibfk_2', 'process_instance', type_='foreignkey')
|
||||||
op.drop_column('process_instance', 'process_instance_data_id')
|
op.drop_column('process_instance', 'process_instance_data_id')
|
||||||
op.drop_column('process_instance', 'serialized_bpmn_definition_id')
|
op.drop_column('process_instance', 'serialized_bpmn_definition_id')
|
||||||
op.drop_index(op.f('ix_serialized_bpmn_definition_hash'), table_name='serialized_bpmn_definition')
|
op.drop_index(op.f('ix_serialized_bpmn_definition_hash'), table_name='serialized_bpmn_definition')
|
||||||
|
|
Loading…
Reference in New Issue