updates
This commit is contained in:
Binary file not shown.
@@ -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
|
||||
""")
|
||||
|
||||
@@ -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
|
||||
""")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user