"""Add ``statement_id`` and ``publisher_id`` columns to ``codal_media`` table.

Revision ID: 0025
"""
from __future__ import annotations

from repo_core.migrations.builder import MigrationBuilder
from repo_core.migrations.runner import Migration

VERSION = "0025"


def get_postgres_migrations() -> list[Migration]:
    return [
        Migration(
            version="codal_media_statement_0001",
            description="Add statement_id and publisher_id columns to codal_media",
            up=(
                MigrationBuilder("codal_media")
                .add_column("statement_id", "TEXT", nullable=True)
                .add_column("publisher_id", "BIGINT", nullable=True)
                .alter_table()
            ),
            down=(
                MigrationBuilder("codal_media")
                .drop_column("publisher_id")
                .drop_column("statement_id")
                .alter_table()
            ),
        ),
    ]
