Various bug fixes for new forms.
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
"""adding cost centre storage to basicsubmission
|
||||
|
||||
Revision ID: 6d2a357860ef
|
||||
Revises: e6647bd661d9
|
||||
Create Date: 2024-04-24 13:01:14.923814
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '6d2a357860ef'
|
||||
down_revision = 'e6647bd661d9'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
# op.drop_table('_alembic_tmp__submissionsampleassociation')
|
||||
with op.batch_alter_table('_basicsubmission', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('cost_centre', sa.String(length=64), nullable=True))
|
||||
|
||||
# with op.batch_alter_table('_submissionsampleassociation', schema=None) as batch_op:
|
||||
# batch_op.create_unique_constraint(None, ['id'])
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
# with op.batch_alter_table('_submissionsampleassociation', schema=None) as batch_op:
|
||||
# batch_op.drop_constraint(None, type_='unique')
|
||||
|
||||
with op.batch_alter_table('_basicsubmission', schema=None) as batch_op:
|
||||
batch_op.drop_column('used_cost_centre')
|
||||
|
||||
op.create_table('_alembic_tmp__submissionsampleassociation',
|
||||
sa.Column('sample_id', sa.INTEGER(), nullable=False),
|
||||
sa.Column('submission_id', sa.INTEGER(), nullable=False),
|
||||
sa.Column('row', sa.INTEGER(), nullable=False),
|
||||
sa.Column('column', sa.INTEGER(), nullable=False),
|
||||
sa.Column('base_sub_type', sa.VARCHAR(), nullable=True),
|
||||
sa.Column('id', sa.INTEGER(), server_default=sa.text('1'), nullable=False),
|
||||
sa.ForeignKeyConstraint(['sample_id'], ['_basicsample.id'], ),
|
||||
sa.ForeignKeyConstraint(['submission_id'], ['_basicsubmission.id'], ),
|
||||
sa.PrimaryKeyConstraint('submission_id', 'row', 'column'),
|
||||
sa.UniqueConstraint('id', name='ssa_id')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
@@ -0,0 +1,33 @@
|
||||
"""adding default info to submissiontype
|
||||
|
||||
Revision ID: e6647bd661d9
|
||||
Revises: f18487b41f45
|
||||
Create Date: 2024-04-22 12:02:21.512781
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'e6647bd661d9'
|
||||
down_revision = 'f18487b41f45'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('_submissiontype', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('defaults', sa.JSON(), nullable=True))
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('_submissiontype', schema=None) as batch_op:
|
||||
batch_op.drop_column('defaults')
|
||||
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user