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.add_column("system_settings", sa.Column("theme_primary_color", sa.String(20), nullable=False, server_default="#2563eb"))
op.add_column("system_settings", sa.Column("theme_accent_color", sa.String(20), nullable=False, server_default="#d946ef"))
op.add_column("system_settings", sa.Column("theme_font_family", sa.String(100), nullable=False, server_default="Inter"))
op.add_column("system_settings", sa.Column("theme_border_radius", sa.String(20), nullable=False, server_default="0.5rem"))
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")