"""empty message

Revision ID: 9c0d7f0a89e8
Revises: f8856168298f
Create Date: 2018-01-11 13:35:53.101336

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "9c0d7f0a89e8"
down_revision = "f8856168298f"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "groups",
        sa.Column("id", sa.INTEGER(), nullable=False),
        sa.Column("name", sa.String(length=80), nullable=True),
        sa.PrimaryKeyConstraint("id", name=op.f("pk_groups")),
    )

    op.create_table(
        "group_user_association",
        sa.Column("group_id", sa.INTEGER(), nullable=True),
        sa.Column("user_id", sa.String(length=80), nullable=True),
        sa.ForeignKeyConstraint(
            ["group_id"],
            ["groups.id"],
            name=op.f("fk_group_user_association_group_id_groups"),
        ),
        sa.ForeignKeyConstraint(
            ["user_id"],
            ["users.id"],
            name=op.f("fk_group_user_association_user_id_users"),
        ),
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("group_user_association")
    op.drop_table("groups")
    # ### end Alembic commands ###
