"""add meta_description_translations and drop meta_keywords from content_pages

Revision ID: cms_003
Revises: cms_002
Create Date: 2026-04-15
"""

import sqlalchemy as sa

from alembic import op

revision = "cms_003"
down_revision = "cms_002"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column(
        "content_pages",
        sa.Column(
            "meta_description_translations",
            sa.JSON(),
            nullable=True,
            comment="Language-keyed meta description dict for multi-language SEO",
        ),
    )
    op.drop_column("content_pages", "meta_keywords")


def downgrade() -> None:
    op.add_column(
        "content_pages",
        sa.Column("meta_keywords", sa.String(300), nullable=True),
    )
    op.drop_column("content_pages", "meta_description_translations")
