[
  {
    "type": "alter_table",
    "description": "Spec 050 Kiosk API v1: add stores.flowConfig JSON — the per-store kiosk check-in QUESTION FLOW block, authored in the Tablet admin page and served in GET /api/v1/config under config.flow. Shape { disableTextQuestion, disablePickupQuestion, disableBinsQuestion (bools, default false = question shown), maxContainers (int 1-30, default 15), defaultTextMe (bool, default true), defaultInStore (bool, default false), defaultContainers (int, default 1) }. The default* fields are what the kiosk submits for a question that is hidden, so stores control the off-state instead of the app hardcoding it. NULL = nothing authored (config.flow emits documented defaults). Net-new, additive, nullable — all v1 endpoints keep working pre-migration via graceful fallback.",
    "database": "kiosk_buykiosk",
    "check_query": "SELECT COLUMN_NAME FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'kiosk_buykiosk' AND TABLE_NAME = 'stores' AND COLUMN_NAME = 'flowConfig'",
    "sql": "ALTER TABLE `stores` ADD COLUMN `flowConfig` JSON DEFAULT NULL COMMENT 'Spec 050: per-store kiosk check-in question-flow config served under /api/v1/config config.flow. NULL = none (app defaults).'"
  },
  {
    "type": "alter_table",
    "description": "Spec 050 Kiosk API v1: add stores.loyaltyConfig JSON — the per-store kiosk LOYALTY block, authored in the Tablet admin page and served in GET /api/v1/config under config.loyalty. Shape { vipEnabled (bool, default true), emailDefault (bool, default false) }. vipEnabled toggles the 'Join the VIP list' email opt-in card on the Verify screen; opting in sets the emailOptIn flag on the incoming buy (which feeds the store's Constant Contact list via the Constant Contact integration). emailDefault is the emailOptIn value carried when the card is hidden (vipEnabled=false). This is unrelated to the deprecated stores.loyaltySystem flag. NULL = nothing authored (config.loyalty emits documented defaults). Net-new, additive, nullable — all v1 endpoints keep working pre-migration via graceful fallback.",
    "database": "kiosk_buykiosk",
    "check_query": "SELECT COLUMN_NAME FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'kiosk_buykiosk' AND TABLE_NAME = 'stores' AND COLUMN_NAME = 'loyaltyConfig'",
    "sql": "ALTER TABLE `stores` ADD COLUMN `loyaltyConfig` JSON DEFAULT NULL COMMENT 'Spec 050: per-store kiosk loyalty (VIP email opt-in) config served under /api/v1/config config.loyalty. NULL = none (app defaults).'"
  }
]
