37 lines
1.3 KiB
Python

"""empty message
Revision ID: 5d8e49f9c560
Revises: 0b5dd14bfbac
Create Date: 2023-04-17 11:28:39.714193
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '5d8e49f9c560'
down_revision = '0b5dd14bfbac'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('bpmn_process_definition', schema=None) as batch_op:
batch_op.alter_column('hash', existing_type=sa.String(length=255), new_column_name='single_process_hash')
batch_op.add_column(sa.Column('full_process_model_hash', sa.String(length=255), nullable=True))
batch_op.create_unique_constraint(None, ['full_process_model_hash'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('bpmn_process_definition', schema=None) as batch_op:
batch_op.drop_constraint('full_process_model_hash', type_='unique')
batch_op.drop_column('full_process_model_hash')
batch_op.alter_column('single_process_hash', existing_type=sa.String(length=255), new_column_name='hash')
# ### end Alembic commands ###