Files
leocrm/alembic/versions/0023_theme_customization.py
T

27 lines
1.0 KiB
Python
Raw Normal View History

2026-07-23 08:42:26 +02:00
"""Theme customization — add theme fields to system_settings.
Revision ID: 0023
Revises: 0022_contact_folders
Create Date: 2026-07-23
"""
from alembic import op
import sqlalchemy as sa
revision = "0023_theme_customization"
down_revision = "0022_contact_folders"
def upgrade():
op.execute("ALTER TABLE system_settings ADD COLUMN IF NOT EXISTS theme_primary_color VARCHAR(20) NOT NULL DEFAULT '#2563eb'")
op.execute("ALTER TABLE system_settings ADD COLUMN IF NOT EXISTS theme_accent_color VARCHAR(20) NOT NULL DEFAULT '#d946ef'")
op.execute("ALTER TABLE system_settings ADD COLUMN IF NOT EXISTS theme_font_family VARCHAR(100) NOT NULL DEFAULT 'Inter'")
op.execute("ALTER TABLE system_settings ADD COLUMN IF NOT EXISTS theme_border_radius VARCHAR(20) NOT NULL DEFAULT '0.5rem'")
2026-07-23 08:42:26 +02:00
def downgrade():
op.drop_column("system_settings", "theme_border_radius")
op.drop_column("system_settings", "theme_font_family")
op.drop_column("system_settings", "theme_accent_color")
op.drop_column("system_settings", "theme_primary_color")