Re-create migrations init tables
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
"""initial_schema_20251006_1516
|
||||
"""initial_schema_20251009_2039
|
||||
|
||||
Revision ID: 964ef5a3ac09
|
||||
Revision ID: 44b6798d898c
|
||||
Revises:
|
||||
Create Date: 2025-10-06 15:16:42.493219+02:00
|
||||
Create Date: 2025-10-09 20:39:18.137489+02:00
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
@@ -12,7 +12,7 @@ import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '964ef5a3ac09'
|
||||
revision: str = '44b6798d898c'
|
||||
down_revision: Union[str, None] = None
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
@@ -31,6 +31,7 @@ def upgrade() -> None:
|
||||
sa.Column('postal_code', sa.String(length=10), nullable=False),
|
||||
sa.Column('latitude', sa.Float(), nullable=True),
|
||||
sa.Column('longitude', sa.Float(), nullable=True),
|
||||
sa.Column('timezone', sa.String(length=50), nullable=False),
|
||||
sa.Column('phone', sa.String(length=20), nullable=True),
|
||||
sa.Column('email', sa.String(length=255), nullable=True),
|
||||
sa.Column('is_active', sa.Boolean(), nullable=True),
|
||||
@@ -1,27 +0,0 @@
|
||||
"""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