new parsers/DB objects, pre code cleanup
This commit is contained in:
34
alembic/versions/3d9a88bd4ecd_added_in_other_ww_techs.py
Normal file
34
alembic/versions/3d9a88bd4ecd_added_in_other_ww_techs.py
Normal file
@@ -0,0 +1,34 @@
|
||||
"""added in other ww techs
|
||||
|
||||
Revision ID: 3d9a88bd4ecd
|
||||
Revises: f7f46e72f057
|
||||
Create Date: 2023-08-30 11:03:41.575219
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '3d9a88bd4ecd'
|
||||
down_revision = 'f7f46e72f057'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('_submissions', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('ext_technician', sa.String(length=64), nullable=True))
|
||||
batch_op.add_column(sa.Column('pcr_technician', sa.String(length=64), nullable=True))
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('_submissions', schema=None) as batch_op:
|
||||
batch_op.drop_column('pcr_technician')
|
||||
batch_op.drop_column('ext_technician')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
@@ -0,0 +1,33 @@
|
||||
"""adjusting reagents/reagenttypes to many-to-many
|
||||
|
||||
Revision ID: 9a133efb3ffd
|
||||
Revises: 3d9a88bd4ecd
|
||||
Create Date: 2023-09-01 10:28:22.335890
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '9a133efb3ffd'
|
||||
down_revision = '3d9a88bd4ecd'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('_reagenttypes_reagents',
|
||||
sa.Column('reagent_id', sa.INTEGER(), nullable=True),
|
||||
sa.Column('reagenttype_id', sa.INTEGER(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['reagent_id'], ['_reagents.id'], ),
|
||||
sa.ForeignKeyConstraint(['reagenttype_id'], ['_reagent_types.id'], )
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('_reagenttypes_reagents')
|
||||
# ### end Alembic commands ###
|
||||
@@ -1,8 +1,8 @@
|
||||
"""rebuild database
|
||||
|
||||
Revision ID: cac89ced412b
|
||||
Revision ID: f7f46e72f057
|
||||
Revises:
|
||||
Create Date: 2023-08-25 14:03:48.883090
|
||||
Create Date: 2023-08-30 09:47:18.071070
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
@@ -10,7 +10,7 @@ import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'cac89ced412b'
|
||||
revision = 'f7f46e72f057'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
@@ -168,8 +168,8 @@ def upgrade() -> None:
|
||||
op.create_table('_submission_sample',
|
||||
sa.Column('sample_id', sa.INTEGER(), nullable=False),
|
||||
sa.Column('submission_id', sa.INTEGER(), nullable=False),
|
||||
sa.Column('row', sa.INTEGER(), nullable=True),
|
||||
sa.Column('column', sa.INTEGER(), nullable=True),
|
||||
sa.Column('row', sa.INTEGER(), nullable=False),
|
||||
sa.Column('column', sa.INTEGER(), nullable=False),
|
||||
sa.Column('base_sub_type', sa.String(), nullable=True),
|
||||
sa.Column('ct_n1', sa.FLOAT(precision=2), nullable=True),
|
||||
sa.Column('ct_n2', sa.FLOAT(precision=2), nullable=True),
|
||||
@@ -178,7 +178,7 @@ def upgrade() -> None:
|
||||
sa.Column('pcr_results', sa.JSON(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['sample_id'], ['_samples.id'], ),
|
||||
sa.ForeignKeyConstraint(['submission_id'], ['_submissions.id'], ),
|
||||
sa.PrimaryKeyConstraint('sample_id', 'submission_id')
|
||||
sa.PrimaryKeyConstraint('submission_id', 'row', 'column')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
Reference in New Issue
Block a user