"""empty message

Revision ID: 123fadbf95c1
Revises: <PASSWORD>
Create Date: 2019-12-07 03:25:23.426107

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('amigosecreto', sa.Column('giving_to_user_id', sa.Integer(), nullable=True))
    op.drop_constraint('amigosecreto_giving_to_user_key', 'amigosecreto', type_='unique')
    op.create_unique_constraint(None, 'amigosecreto', ['giving_to_user_id'])
    op.drop_constraint('amigosecreto_giving_to_user_fkey', 'amigosecreto', type_='foreignkey')
    op.create_foreign_key(None, 'amigosecreto', 'user', ['giving_to_user_id'], ['id'], ondelete='CASCADE')
    op.drop_column('amigosecreto', 'giving_to_user')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('amigosecreto', sa.Column('giving_to_user', sa.INTEGER(), autoincrement=False, nullable=True))
    op.drop_constraint(None, 'amigosecreto', type_='foreignkey')
    op.create_foreign_key('amigosecreto_giving_to_user_fkey', 'amigosecreto', 'user', ['giving_to_user'], ['id'], ondelete='CASCADE')
    op.drop_constraint(None, 'amigosecreto', type_='unique')
    op.create_unique_constraint('amigosecreto_giving_to_user_key', 'amigosecreto', ['giving_to_user'])
    op.drop_column('amigosecreto', 'giving_to_user_id')
    # ### end Alembic commands ###

"""empty message

Revision ID: 123fadbf95c1
Revises: <PASSWORD>
Create Date: 2019-12-07 03:25:23.426107

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('amigosecreto', sa.Column('giving_to_user_id', sa.Integer(), nullable=True))
    op.drop_constraint('amigosecreto_giving_to_user_key', 'amigosecreto', type_='unique')
    op.create_unique_constraint(None, 'amigosecreto', ['giving_to_user_id'])
    op.drop_constraint('amigosecreto_giving_to_user_fkey', 'amigosecreto', type_='foreignkey')
    op.create_foreign_key(None, 'amigosecreto', 'user', ['giving_to_user_id'], ['id'], ondelete='CASCADE')
    op.drop_column('amigosecreto', 'giving_to_user')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('amigosecreto', sa.Column('giving_to_user', sa.INTEGER(), autoincrement=False, nullable=True))
    op.drop_constraint(None, 'amigosecreto', type_='foreignkey')
    op.create_foreign_key('amigosecreto_giving_to_user_fkey', 'amigosecreto', 'user', ['giving_to_user'], ['id'], ondelete='CASCADE')
    op.drop_constraint(None, 'amigosecreto', type_='unique')
    op.create_unique_constraint('amigosecreto_giving_to_user_key', 'amigosecreto', ['giving_to_user'])
    op.drop_column('amigosecreto', 'giving_to_user_id')
    # ### end Alembic commands ###

empty message  Revision ID: 123fadbf95c1 Revises: <PASSWORD> Create Date: 2019-12-07 03:25:23.426107 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###