cr-connect-workflow/migrations/versions/1685be1cc232_.py

46 lines
1.4 KiB
Python

"""empty message
Revision ID: 1685be1cc232
Revises: 0f38d7a36f21
Create Date: 2020-04-22 15:37:12.577008
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1685be1cc232'
down_revision = '0f38d7a36f21'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('lookup_file',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('label_column', sa.String(), nullable=True),
sa.Column('value_column', sa.String(), nullable=True),
sa.Column('file_data_model_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['file_data_model_id'], ['file_data.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('lookup_data',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('lookup_file_model_id', sa.Integer(), nullable=True),
sa.Column('value', sa.String(), nullable=True),
sa.Column('label', sa.String(), nullable=True),
sa.Column('data', sa.JSON(), nullable=True),
sa.ForeignKeyConstraint(['lookup_file_model_id'], ['lookup_file.id'], ),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('lookup_data')
op.drop_table('lookup_file')
# ### end Alembic commands ###