"""add awards table

Revision ID: 62882ef5e3ff
Revises: c08ae04dc482
Create Date: 2024-05-18 16:35:10.145964+00:00

"""

from typing import Sequence

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "62882ef5e3ff"
down_revision: str | None = "c08ae04dc482"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "awards",
        sa.Column("id", sa.String(), nullable=False),
        sa.Column("movie_id", sa.String(), nullable=False),
        sa.Column("category", sa.String(), nullable=False),
        sa.Column("details", sa.String(), nullable=False),
        sa.Column("created", sa.String(), nullable=False),
        sa.Column("updated", sa.String(), nullable=False),
        sa.ForeignKeyConstraint(
            ["movie_id"],
            ["movies.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
    )
    # ### end Alembic commands ###


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