Finalized creation of generic submission types.

This commit is contained in:
lwark
2024-09-06 14:35:12 -05:00
parent 7f6a476cd7
commit 220c74a06d
5 changed files with 35 additions and 63 deletions

View File

@@ -1,56 +0,0 @@
"""Adding Viral Cultures
Revision ID: ef1a0222b882
Revises: 0746f7e2c10e
Create Date: 2024-09-04 10:23:39.245013
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ef1a0222b882'
down_revision = '0746f7e2c10e'
branch_labels = None
depends_on = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('_viralculture',
sa.Column('id', sa.INTEGER(), nullable=False),
sa.ForeignKeyConstraint(['id'], ['_basicsubmission.id'], ),
sa.PrimaryKeyConstraint('id')
)
# with op.batch_alter_table('_process', schema=None) as batch_op:
# batch_op.create_unique_constraint("process_uni", ['sub_type'])
#
# with op.batch_alter_table('_submissionsampleassociation', schema=None) as batch_op:
# batch_op.create_unique_constraint("subsamp_uni", ['id'])
# with op.batch_alter_table('_wastewaterarticassociation', schema=None) as batch_op:
# batch_op.alter_column('source_plate',
# existing_type=sa.VARCHAR(length=16),
# type_=sa.String(length=32),
# existing_nullable=True)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
# with op.batch_alter_table('_wastewaterarticassociation', schema=None) as batch_op:
# batch_op.alter_column('source_plate',
# existing_type=sa.String(length=32),
# type_=sa.VARCHAR(length=16),
# existing_nullable=True)
#
# with op.batch_alter_table('_submissionsampleassociation', schema=None) as batch_op:
# batch_op.drop_constraint("subsamp_uni", type_='unique')
#
# with op.batch_alter_table('_process', schema=None) as batch_op:
# batch_op.drop_constraint("process_uni", type_='unique')
op.drop_table('_viralculture')
# ### end Alembic commands ###