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