"""add_privacy_terms_refunds_to_page_type_enum

Revision ID: 0e2dc5df18c3
Revises: f2a3b4c5d6e7
Create Date: 2025-11-21 10:25:07.463477

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '0e2dc5df18c3'
down_revision = 'f2a3b4c5d6e7'
branch_labels = None
depends_on = None


def upgrade() -> None:
    # For MySQL/MariaDB, we need to alter the enum column to add new values
    # First, modify the column to allow the new enum values
    op.execute("""
        ALTER TABLE page_contents 
        MODIFY COLUMN page_type ENUM('home', 'contact', 'about', 'footer', 'seo', 'privacy', 'terms', 'refunds') 
        NOT NULL
    """)


def downgrade() -> None:
    # Remove the new enum values
    op.execute("""
        ALTER TABLE page_contents 
        MODIFY COLUMN page_type ENUM('home', 'contact', 'about', 'footer', 'seo') 
        NOT NULL
    """)

