"""Add HTTP ``etag`` column to ``web_media`` warehouse table.

Revision ID: 0011
"""
from __future__ import annotations

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

VERSION = "0011"


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