"""add template field to content pages for landing page designs

Revision ID: f68d8da5315a
Revises: 72aa309d4007
Create Date: 2025-11-22 23:51:40.694983

"""

from collections.abc import Sequence

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "f68d8da5315a"
down_revision: str | None = "72aa309d4007"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade() -> None:
    # Add template column to content_pages table
    op.add_column(
        "content_pages",
        sa.Column(
            "template", sa.String(length=50), nullable=False, server_default="default"
        ),
    )


def downgrade() -> None:
    # Remove template column from content_pages table
    op.drop_column("content_pages", "template")
