"""Upgrade User and Survey Objects

Revision ID: 823a9e3627a9
Revises: a5e33684a022
Create Date: 2021-04-06 10:16:13.980341

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '823a9e3627a9'
down_revision = 'a5e33684a022'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('Survey', sa.Column('owner_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'Survey', 'User', ['owner_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'Survey', type_='foreignkey')
    op.drop_column('Survey', 'owner_id')
    # ### end Alembic commands ###
