"""empty message

Revision ID: ae6038fc18d
Revises: 17e1caecd877
Create Date: 2015-10-28 09:21:25.956869

"""

# revision identifiers, used by Alembic.
revision = 'ae6038fc18d'
down_revision = '17e1caecd877'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('patient', sa.Column('deleted', sa.DateTime(), nullable=True))
    op.add_column('patient', sa.Column('deleted_by_id', sa.Integer(), nullable=True))
    op.create_foreign_key('fk_deleted_by_id', 'patient', 'app_user', ['deleted_by_id'], ['id'])
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('fk_deleted_by_id', 'patient', type_='foreignkey')
    op.drop_column('patient', 'deleted_by_id')
    op.drop_column('patient', 'deleted')
    ### end Alembic commands ###
