This commit is contained in:
Iliyan Angelov
2025-11-21 10:55:05 +02:00
parent 722997bb19
commit 4ab7546de0
53 changed files with 3091 additions and 56 deletions

View File

@@ -0,0 +1,36 @@
"""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
""")

View File

@@ -0,0 +1,35 @@
"""add_cancellation_accessibility_faq_to_page_type_enum
Revision ID: 9bb08492a382
Revises: 0e2dc5df18c3
Create Date: 2025-11-21 10:39:56.040401
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '9bb08492a382'
down_revision = '0e2dc5df18c3'
branch_labels = None
depends_on = None
def upgrade() -> None:
# Add new enum values: cancellation, accessibility, faq
op.execute("""
ALTER TABLE page_contents
MODIFY COLUMN page_type ENUM('home', 'contact', 'about', 'footer', 'seo', 'privacy', 'terms', 'refunds', 'cancellation', 'accessibility', 'faq')
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', 'privacy', 'terms', 'refunds')
NOT NULL
""")