forgot the migration.

This commit is contained in:
Dan Funk 2020-05-28 10:31:20 -04:00
parent cd7f67ab48
commit 8f41dfa95f
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
"""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 ###