Files
TimeTracker/migrations/versions/003_add_user_theme_preference.py
T
Dries Peeters 66919c96b2 feat(ui): dark mode fixes and Log Time UX aligned with invoices
Make user dropdown fully dark; fix hover/divider; remove white overlay
Mobile dropdown respects dark vars; improve navbar-collapse bg/z-index
Improve action button grouping/contrast across pages
Add dark-mode variants for badges, lists, pagination, utilities
Refresh Log Time page: card header, mini-cards for Start/End, unified labels
Group Save/Clear actions; Back remains secondary
Per-user theme preference: model column + migration (003) + POST /auth/profile/theme
Base loads user theme (fallback to local/system); remove admin theme selector
2025-09-05 10:04:49 +02:00

21 lines
454 B
Python

from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '003'
down_revision = '002'
branch_labels = None
depends_on = None
def upgrade():
with op.batch_alter_table('users') as batch_op:
batch_op.add_column(sa.Column('theme_preference', sa.String(length=10), nullable=True))
def downgrade():
with op.batch_alter_table('users') as batch_op:
batch_op.drop_column('theme_preference')