removed old branch migrations and created single one for this branch w/ burnettk

This commit is contained in:
jasquat 2023-03-01 15:40:17 -05:00
parent 76e654ca60
commit 59c5ed296d
4 changed files with 20 additions and 126 deletions

View File

@ -1,50 +0,0 @@
"""empty message
Revision ID: 553ba18e4076
Revises: e494a3955ce5
Create Date: 2023-03-01 11:31:20.619328
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '553ba18e4076'
down_revision = 'e494a3955ce5'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('process_instance', sa.Column('process_instance_data_id', sa.Integer(), nullable=True))
op.create_foreign_key(None, 'process_instance', 'process_instance_data', ['process_instance_data_id'], ['id'])
op.alter_column('process_instance_data', 'runtime_json',
existing_type=mysql.JSON(),
nullable=False)
op.drop_constraint('process_instance_data_ibfk_1', 'process_instance_data', type_='foreignkey')
op.drop_column('process_instance_data', 'process_instance_id')
op.alter_column('serialized_bpmn_definition', 'static_json',
existing_type=mysql.JSON(),
nullable=False)
op.drop_index('ix_serialized_bpmn_definition_hash', table_name='serialized_bpmn_definition')
op.create_index(op.f('ix_serialized_bpmn_definition_hash'), 'serialized_bpmn_definition', ['hash'], unique=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_serialized_bpmn_definition_hash'), table_name='serialized_bpmn_definition')
op.create_index('ix_serialized_bpmn_definition_hash', 'serialized_bpmn_definition', ['hash'], unique=False)
op.alter_column('serialized_bpmn_definition', 'static_json',
existing_type=mysql.JSON(),
nullable=True)
op.add_column('process_instance_data', sa.Column('process_instance_id', mysql.INTEGER(), autoincrement=False, nullable=False))
op.create_foreign_key('process_instance_data_ibfk_1', 'process_instance_data', 'process_instance', ['process_instance_id'], ['id'])
op.alter_column('process_instance_data', 'runtime_json',
existing_type=mysql.JSON(),
nullable=True)
op.drop_constraint(None, 'process_instance', type_='foreignkey')
op.drop_column('process_instance', 'process_instance_data_id')
# ### end Alembic commands ###

View File

@ -1,8 +1,8 @@
"""empty message """empty message
Revision ID: dc8f4b664e78 Revision ID: 7422be14adc4
Revises: fdf522e4c48a Revises: ac6b60d7fee9
Create Date: 2023-02-28 17:38:42.496187 Create Date: 2023-03-01 15:39:25.731722
""" """
from alembic import op from alembic import op
@ -10,8 +10,8 @@ import sqlalchemy as sa
# revision identifiers, used by Alembic. # revision identifiers, used by Alembic.
revision = 'dc8f4b664e78' revision = '7422be14adc4'
down_revision = 'fdf522e4c48a' down_revision = 'ac6b60d7fee9'
branch_labels = None branch_labels = None
depends_on = None depends_on = None
@ -20,23 +20,32 @@ def upgrade():
# ### commands auto generated by Alembic - please adjust! ### # ### commands auto generated by Alembic - please adjust! ###
op.create_table('process_instance_data', op.create_table('process_instance_data',
sa.Column('id', sa.Integer(), nullable=False), sa.Column('id', sa.Integer(), nullable=False),
sa.Column('process_instance_id', sa.Integer(), nullable=False), sa.Column('runtime_json', sa.JSON(), nullable=False),
sa.Column('runtime_json', sa.JSON(), nullable=True),
sa.ForeignKeyConstraint(['process_instance_id'], ['process_instance.id'], ),
sa.PrimaryKeyConstraint('id') sa.PrimaryKeyConstraint('id')
) )
op.create_table('serialized_bpmn_definition',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('hash', sa.String(length=255), nullable=False),
sa.Column('static_json', sa.JSON(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_serialized_bpmn_definition_hash'), 'serialized_bpmn_definition', ['hash'], unique=True)
op.add_column('process_instance', sa.Column('serialized_bpmn_definition_id', sa.Integer(), nullable=True)) op.add_column('process_instance', sa.Column('serialized_bpmn_definition_id', sa.Integer(), nullable=True))
op.add_column('process_instance', sa.Column('process_instance_data_id', sa.Integer(), nullable=True))
op.create_foreign_key(None, 'process_instance', 'process_instance_data', ['process_instance_data_id'], ['id'])
op.create_foreign_key(None, 'process_instance', 'serialized_bpmn_definition', ['serialized_bpmn_definition_id'], ['id']) 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=True))
op.add_column('spiff_step_details', sa.Column('delta_json', sa.JSON(), nullable=False))
# ### end Alembic commands ### # ### end Alembic commands ###
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_index(op.f('ix_serialized_bpmn_definition_hash'), table_name='serialized_bpmn_definition')
op.drop_constraint(None, 'process_instance', type_='foreignkey') op.drop_constraint(None, 'process_instance', type_='foreignkey')
op.drop_constraint(None, 'process_instance', type_='foreignkey')
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_table('serialized_bpmn_definition')
op.drop_table('process_instance_data') op.drop_table('process_instance_data')
# ### end Alembic commands ### # ### end Alembic commands ###

View File

@ -1,32 +0,0 @@
"""empty message
Revision ID: e494a3955ce5
Revises: dc8f4b664e78
Create Date: 2023-02-28 17:41:51.208350
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'e494a3955ce5'
down_revision = 'dc8f4b664e78'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('spiff_step_details', 'delta_json',
existing_type=mysql.JSON(),
nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('spiff_step_details', 'delta_json',
existing_type=mysql.JSON(),
nullable=False)
# ### end Alembic commands ###

View File

@ -1,33 +0,0 @@
"""empty message
Revision ID: fdf522e4c48a
Revises: ac6b60d7fee9
Create Date: 2023-02-28 14:50:26.030983
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'fdf522e4c48a'
down_revision = 'ac6b60d7fee9'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('serialized_bpmn_definition',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('hash', sa.String(length=255), nullable=False),
sa.Column('static_json', sa.JSON(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('serialized_bpmn_definition')
# ### end Alembic commands ###