"""Add platform with enums to DependsOn table

Revision ID: 5d41082a1433
Revises: 894ddaef0c43
Create Date: 2021-06-16 07:54:40.877199+00:00

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = "5d41082a1433"
down_revision = "894ddaef0c43"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    platform = postgresql.ENUM("linux-x86_64", name="platform")
    platform.create(op.get_bind())
    op.add_column(
        "depends_on",
        sa.Column(
            "platform", postgresql.ENUM("linux-x86_64", name="platform"), server_default="linux-x86_64", nullable=False
        ),
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("depends_on", "platform")
    platform = postgresql.ENUM("linux-x86_64", name="platform")
    platform.drop(op.get_bind())
    # ### end Alembic commands ###
