Add support for setting user timezone

This commit is contained in:
Peter Stockings
2024-12-28 01:11:11 +11:00
parent 32f810a8b3
commit 2caddf52fe
9 changed files with 147 additions and 270 deletions

View File

@@ -0,0 +1,32 @@
"""Add timezone to Profile model
Revision ID: 5e5a1b78b966
Revises: 59097bee8942
Create Date: 2024-12-28 00:46:52.941616
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '5e5a1b78b966'
down_revision = '59097bee8942'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('profile', schema=None) as batch_op:
batch_op.add_column(sa.Column('timezone', sa.String(length=50), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('profile', schema=None) as batch_op:
batch_op.drop_column('timezone')
# ### end Alembic commands ###