"""Adds participant metadata

Revision ID: 50972429e3f0
Revises: 5693756fd192
Create Date: 2020-06-11 13:22:45.257447

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "50972429e3f0"
down_revision = "5693756fd192"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("participant", sa.Column("added_by_id", sa.Integer(), nullable=True))
    op.add_column("participant", sa.Column("added_reason", sa.String(), nullable=True))
    op.create_foreign_key(None, "participant", "participant", ["added_by_id"], ["id"])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, "participant", type_="foreignkey")
    op.drop_column("participant", "added_reason")
    op.drop_column("participant", "added_by_id")
    # ### end Alembic commands ###
