spiff-arena/spiffworkflow-backend/migrations/versions/68adb1d504e1_.py

35 lines
1.1 KiB
Python

"""empty message
Revision ID: 68adb1d504e1
Revises: 0c7428378d6e
Create Date: 2023-04-27 12:24:01.771698
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '68adb1d504e1'
down_revision = '664bb2f00694'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('process_instance_report', schema=None) as batch_op:
batch_op.add_column(sa.Column('json_data_hash', sa.String(length=255)))
batch_op.alter_column('json_data_hash', existing_type=sa.String(length=255), nullable=False)
batch_op.create_index(batch_op.f('ix_process_instance_report_json_data_hash'), ['json_data_hash'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('process_instance_report', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('ix_process_instance_report_json_data_hash'))
batch_op.drop_column('json_data_hash')
# ### end Alembic commands ###