<reponame>mclueppers/dispatch<gh_stars>1-10
"""Adds team and department columns as strings.

Revision ID: 81038e961414
Revises: 50d0688878ae
Create Date: 2020-03-18 17:23:18.417762

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "81038e961414"
down_revision = "<KEY>"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("participant", sa.Column("department", sa.String(), nullable=True))
    op.add_column("participant", sa.Column("team", sa.String(), nullable=True))
    op.drop_constraint("participant_team_id_fkey", "participant", type_="foreignkey")
    op.drop_column("participant", "team_id")
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "participant", sa.Column("team_id", sa.INTEGER(), autoincrement=False, nullable=True)
    )
    op.create_foreign_key(
        "participant_team_id_fkey", "participant", "team_contact", ["team_id"], ["id"]
    )
    op.drop_column("participant", "team")
    op.drop_column("participant", "department")
    # ### end Alembic commands ###

"""Adds team and department columns as strings.

Revision ID: 81038e961414
Revises: 50d0688878ae
Create Date: 2020-03-18 17:23:18.417762

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "81038e961414"
down_revision = "<KEY>"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("participant", sa.Column("department", sa.String(), nullable=True))
    op.add_column("participant", sa.Column("team", sa.String(), nullable=True))
    op.drop_constraint("participant_team_id_fkey", "participant", type_="foreignkey")
    op.drop_column("participant", "team_id")
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "participant", sa.Column("team_id", sa.INTEGER(), autoincrement=False, nullable=True)
    )
    op.create_foreign_key(
        "participant_team_id_fkey", "participant", "team_contact", ["team_id"], ["id"]
    )
    op.drop_column("participant", "team")
    op.drop_column("participant", "department")
    # ### end Alembic commands ###
Adds team and department columns as strings.  Revision ID: 81038e961414 Revises: 50d0688878ae Create Date: 2020-03-18 17:23:18.417762 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###