28 lines
693 B
Python
28 lines
693 B
Python
"""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')
|