[
  {
    "type": "alter_table",
    "description": "Add keepRegisterCheckoutsOnQueue feature-flag column to stores table. Controls register checkout (/checkOut, /syncCheckOut) behavior for a buy paid at the register but never processed in the kiosk. Default 0 = finalize on checkout (isProcessed=1, timeCompleted set) so the buy leaves the queue and lands in the completed log immediately. 1 = leave it on the active queue (checkedOut=1, isProcessed=0) so staff can still process it and send the pickup text; the overnight StrandedBuyCleanupJob sweeps any leftovers.",
    "database": "kiosk_buykiosk",
    "check_query": "SELECT COLUMN_NAME FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'kiosk_buykiosk' AND TABLE_NAME = 'stores' AND COLUMN_NAME = 'keepRegisterCheckoutsOnQueue'",
    "sql": "ALTER TABLE `stores` ADD COLUMN `keepRegisterCheckoutsOnQueue` TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'Register checkout keeps the buy on the active queue for manual kiosk processing/text (1) instead of finalizing it to the completed log (0).' AFTER `schedulePanelEnabled`"
  }
]
