"""request_form_add_to_parent

Revision: 0151
Revision ID: 3124afe3927f
Revises: 476d0278b0a7
Create Date: 2018-11-30 15:56:57.172795

"""

# revision identifiers, used by Alembic.
revision = '3124afe3927f'
down_revision = '476d0278b0a7'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('request_forms', sa.Column('add_to_parent_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'request_forms', 'cards', ['add_to_parent_id'], ['id'], ondelete='SET NULL')


def downgrade():
    op.drop_column('request_forms', 'add_to_parent_id')
