"""empty message

Revision ID: c4734f6489df
Revises: ccc32cd9b882
Create Date: 2019-02-28 16:54:15.562552

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "c4734f6489df"
down_revision = "ccc32cd9b882"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("students", sa.Column("creator_id", sa.Integer()))
    op.add_column(
        "students",
        sa.Column("is_active", sa.Boolean(), nullable=False, server_default="True"),
    )
    op.add_column(
        "students",
        sa.Column("is_approved", sa.Boolean(), nullable=False, server_default="False"),
    )
    op.create_foreign_key(None, "students", "users", ["creator_id"], ["id"])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, "students", type_="foreignkey")
    op.drop_column("students", "is_approved")
    op.drop_column("students", "is_active")
    op.drop_column("students", "creator_id")
    # ### end Alembic commands ###
