35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
"""empty message
|
|
|
|
Revision ID: 23c62c933848
|
|
Revises: 9b43e725f39c
|
|
Create Date: 2020-05-28 10:30:49.409760
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '23c62c933848'
|
|
down_revision = '9b43e725f39c'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint('file_study_id_fkey', 'file', type_='foreignkey')
|
|
op.drop_column('file', 'task_id')
|
|
op.drop_column('file', 'study_id')
|
|
op.drop_column('file', 'form_field_key')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('file', sa.Column('form_field_key', sa.VARCHAR(), autoincrement=False, nullable=True))
|
|
op.add_column('file', sa.Column('study_id', sa.INTEGER(), autoincrement=False, nullable=True))
|
|
op.add_column('file', sa.Column('task_id', sa.VARCHAR(), autoincrement=False, nullable=True))
|
|
op.create_foreign_key('file_study_id_fkey', 'file', 'study', ['study_id'], ['id'])
|
|
# ### end Alembic commands ###
|