REFACTOR production scheduler
This commit is contained in:
@@ -28,7 +28,10 @@ class Tenant(Base):
|
||||
postal_code = Column(String(10), nullable=False)
|
||||
latitude = Column(Float)
|
||||
longitude = Column(Float)
|
||||
|
||||
|
||||
# Timezone configuration for accurate scheduling
|
||||
timezone = Column(String(50), default="Europe/Madrid", nullable=False)
|
||||
|
||||
# Contact info
|
||||
phone = Column(String(20))
|
||||
email = Column(String(255))
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
"""Add timezone column to tenants
|
||||
|
||||
Revision ID: 20251009_timezone
|
||||
Revises: 964ef5a3ac09
|
||||
Create Date: 2025-10-09
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '20251009_timezone'
|
||||
down_revision = '964ef5a3ac09'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Add timezone column to tenants table for accurate scheduling"""
|
||||
# Add timezone column with default Europe/Madrid
|
||||
op.add_column('tenants', sa.Column('timezone', sa.String(50), nullable=False, server_default='Europe/Madrid'))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Remove timezone column from tenants table"""
|
||||
op.drop_column('tenants', 'timezone')
|
||||
Reference in New Issue
Block a user