fixing migration paths (I hope) and fixing a down migration that wasn't working as I attempted to debug.

This commit is contained in:
Dan 2021-03-02 14:36:20 -05:00
parent 9e758c57d3
commit bf8c0ba86f
2 changed files with 12 additions and 14 deletions

View File

@ -1,8 +1,8 @@
"""empty message
Revision ID: 7ec759f994c8
Revises: cb892916166a
Create Date: 2021-03-01 12:51:53.681624
Revision ID: c872232ebdcb
Revises: f28ee3722c49
Create Date: 2021-03-02 14:35:13.911050
"""
from alembic import op
@ -10,10 +10,8 @@ import sqlalchemy as sa
# revision identifiers, used by Alembic.
from sqlalchemy.dialects import postgresql
revision = '7ec759f994c8'
down_revision = 'cb892916166a'
revision = 'c872232ebdcb'
down_revision = 'f28ee3722c49'
branch_labels = None
depends_on = None
@ -30,4 +28,4 @@ def upgrade():
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('lookup_file', 'task_spec_id')
# ### end Alembic commands ###
# ### end Alembic commands ###

View File

@ -25,12 +25,6 @@ def upgrade():
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('approval_file',
sa.Column('approval_id', sa.INTEGER(), autoincrement=False, nullable=False),
sa.Column('file_data_id', sa.INTEGER(), autoincrement=False, nullable=False),
sa.ForeignKeyConstraint(['approval_id'], ['approval.id'], name='approval_file_approval_id_fkey'),
sa.ForeignKeyConstraint(['file_data_id'], ['file_data.id'], name='approval_file_file_data_id_fkey')
)
op.create_table('approval',
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
sa.Column('study_id', sa.INTEGER(), autoincrement=False, nullable=False),
@ -45,4 +39,10 @@ def downgrade():
sa.ForeignKeyConstraint(['workflow_id'], ['workflow.id'], name='approval_workflow_id_fkey'),
sa.PrimaryKeyConstraint('id', name='approval_pkey')
)
op.create_table('approval_file',
sa.Column('approval_id', sa.INTEGER(), autoincrement=False, nullable=False),
sa.Column('file_data_id', sa.INTEGER(), autoincrement=False, nullable=False),
sa.ForeignKeyConstraint(['approval_id'], ['approval.id'], name='approval_file_approval_id_fkey'),
sa.ForeignKeyConstraint(['file_data_id'], ['file_data.id'], name='approval_file_file_data_id_fkey')
)
# ### end Alembic commands ###