cr-connect-workflow/migrations/versions/665624ac29f1_.py

30 lines
817 B
Python

"""empty message
Revision ID: 665624ac29f1
Revises: c872232ebdcb
Create Date: 2021-04-26 15:10:34.000646
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '665624ac29f1'
down_revision = 'c872232ebdcb'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('data_store', sa.Column('file_id', sa.Integer(), nullable=True))
op.create_foreign_key('file_id_key', 'data_store', 'file', ['file_id'], ['id'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint('file_id_key', 'data_store', type_='foreignkey')
op.drop_column('data_store', 'file_id')
# ### end Alembic commands ###