mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-30 03:06:15 +00:00
43 lines
1.6 KiB
Python
43 lines
1.6 KiB
Python
|
"""empty message
|
||
|
|
||
|
Revision ID: dc8f4b664e78
|
||
|
Revises: fdf522e4c48a
|
||
|
Create Date: 2023-02-28 17:38:42.496187
|
||
|
|
||
|
"""
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = 'dc8f4b664e78'
|
||
|
down_revision = 'fdf522e4c48a'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.create_table('process_instance_data',
|
||
|
sa.Column('id', sa.Integer(), nullable=False),
|
||
|
sa.Column('process_instance_id', sa.Integer(), nullable=False),
|
||
|
sa.Column('runtime_json', sa.JSON(), nullable=True),
|
||
|
sa.ForeignKeyConstraint(['process_instance_id'], ['process_instance.id'], ),
|
||
|
sa.PrimaryKeyConstraint('id')
|
||
|
)
|
||
|
op.add_column('process_instance', sa.Column('serialized_bpmn_definition_id', sa.Integer(), nullable=True))
|
||
|
op.create_foreign_key(None, 'process_instance', 'serialized_bpmn_definition', ['serialized_bpmn_definition_id'], ['id'])
|
||
|
op.create_index(op.f('ix_serialized_bpmn_definition_hash'), 'serialized_bpmn_definition', ['hash'], unique=False)
|
||
|
op.add_column('spiff_step_details', sa.Column('delta_json', sa.JSON(), nullable=False))
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_column('spiff_step_details', 'delta_json')
|
||
|
op.drop_index(op.f('ix_serialized_bpmn_definition_hash'), table_name='serialized_bpmn_definition')
|
||
|
op.drop_constraint(None, 'process_instance', type_='foreignkey')
|
||
|
op.drop_column('process_instance', 'serialized_bpmn_definition_id')
|
||
|
op.drop_table('process_instance_data')
|
||
|
# ### end Alembic commands ###
|