REFACTOR production scheduler

This commit is contained in:
Urtzi Alfaro
2025-10-09 18:01:24 +02:00
parent 3c689b4f98
commit b420af32c5
13 changed files with 4046 additions and 6 deletions

View File

@@ -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')