35 lines
1023 B
Python
35 lines
1023 B
Python
"""Adding ranking to SubmissionSampleAssociation
|
|
|
|
Revision ID: 874af342c82c
|
|
Revises: a04c25fd9138
|
|
Create Date: 2024-05-03 15:08:20.194275
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '874af342c82c'
|
|
down_revision = 'a04c25fd9138'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('_submissionsampleassociation', schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('submission_rank', sa.INTEGER(), nullable=False, default=1))
|
|
# 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')
|
|
batch_op.drop_column('submission_rank')
|
|
|
|
# ### end Alembic commands ###
|