"""Add ``content_disposition`` column to ``web_media`` warehouse table.

Revision ID: 0012
"""
from __future__ import annotations

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

VERSION = "0012"


def get_doris_migrations() -> list[Migration]:
    return [
        Migration(
            version="web_media_content_disposition_doris_0001",
            description="Add content_disposition column to web_media warehouse table",
            dialect="doris",
            up=(
                MigrationBuilder("web_media", dialect="doris")
                .add_column("content_disposition", "TEXT", nullable=True)
                .alter_table()
            ),
            down=(
                MigrationBuilder("web_media", dialect="doris")
                .drop_column("content_disposition")
                .alter_table()
            ),
        ),
    ]
