40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
"""Adding configitems to db
|
|
|
|
Revision ID: f829a8ab292f
|
|
Revises: 874af342c82c
|
|
Create Date: 2024-05-15 14:03:11.767480
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'f829a8ab292f'
|
|
down_revision = '874af342c82c'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('_configitem',
|
|
sa.Column('id', sa.INTEGER(), nullable=False),
|
|
sa.Column('key', sa.String(), nullable=True),
|
|
sa.Column('value', sa.JSON(), nullable=True),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
# 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')
|
|
|
|
op.drop_table('_configitem')
|
|
# ### end Alembic commands ###
|