Added SubmissionType to KitRTAssoc

This commit is contained in:
Landon Wark
2024-01-08 13:19:27 -06:00
parent 8c688df75f
commit d66d861262
3 changed files with 275 additions and 103 deletions

View File

@@ -0,0 +1,34 @@
"""Adding SubmissionType to KitReagentTypeAssociations
Revision ID: 4606a7be32e8
Revises: 67fa77849024
Create Date: 2024-01-08 09:04:46.917615
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '4606a7be32e8'
down_revision = '67fa77849024'
branch_labels = None
depends_on = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('_reagenttypes_kittypes', schema=None) as batch_op:
batch_op.add_column(sa.Column('submission_type_id', sa.INTEGER(), nullable=False))
batch_op.create_foreign_key("st_kt_rt_assoc", '_submission_types', ['submission_type_id'], ['id'])
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('_reagenttypes_kittypes', schema=None) as batch_op:
batch_op.drop_constraint(None, type_='foreignkey')
batch_op.drop_column('submission_type_id')
# ### end Alembic commands ###