"""ADD custom join code

Revision ID: 3890c28bd2cb
Revises: 2af8f3918f87
Create Date: 2021-06-13 09:28:47.780360

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "3890c28bd2cb"
down_revision = "2af8f3918f87"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("course", sa.Column("join_code", sa.String(length=256), nullable=True))
    op.create_unique_constraint(None, "course", ["join_code"])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("course", "join_code")
    # ### end Alembic commands ###
