Added SubmissionType to KitRTAssoc
This commit is contained in:
34
alembic/versions/4606a7be32e8_adding_submissiontype_to_.py
Normal file
34
alembic/versions/4606a7be32e8_adding_submissiontype_to_.py
Normal 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 ###
|
||||
Reference in New Issue
Block a user