"""Add ``details`` JSONB column to ``codal_statements``. 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_statements_0005",
            description="Add details JSONB column to codal_statements",
            up=(
                MigrationBuilder("codal_statements")
                .add_column("details", "JSONB", nullable=True)
                .alter_table()
            ),
            down=(
                MigrationBuilder("codal_statements")
                .drop_column("details")
                .alter_table()
            ),
        ),
    ]
