Files
xenia-pos-cloud/cloud_backend/migrations/versions/0004_order_area_id.py
T
bonaminandClaude Opus 5.5 9ccb47cfd1 feat(cloud): online orders keep the delivery area's id for the site's fee check
The site checks the cloud's delivery fee with its own engine when it pulls an order (plan
phase 3S, step S.5) and needs the area by id: a name can change between a menu push and
the order. New column online_orders.delivery_area_id (migration 0004), set from the priced
cart, and in the pending-orders payload (C-4, additive).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:38:00 +02:00

28 lines
820 B
Python

"""online orders: delivery_area_id (plan phase 3S, S.5)
The site checks the cloud's delivery fee with its own engine when it pulls an order, and
needs the area by id (a name can change between a menu push and the order).
Revision ID: 0004_order_area_id
Revises: 0003_order_sales_point
Create Date: 2026-11-16 18:00:00
"""
from alembic import op
import sqlalchemy as sa
revision = '0004_order_area_id'
down_revision = '0003_order_sales_point'
branch_labels = None
depends_on = None
def upgrade() -> None:
with op.batch_alter_table('online_orders', schema=None) as batch_op:
batch_op.add_column(sa.Column('delivery_area_id', sa.Integer(), nullable=True))
def downgrade() -> None:
with op.batch_alter_table('online_orders', schema=None) as batch_op:
batch_op.drop_column('delivery_area_id')