[
  {
    "type": "alter_table",
    "description": "Spec 051 T1B.3: extend billingSmsUsage.smsCategory ENUM with 'scheduling_invite' (additive - enum superset is rollback-safe). Preserves the NOT NULL constraint from migration 037_001 (which added 'inbound'). Note: 037_001's own JSON declares type 'modify_column', an op type this migration system's dispatcher does not implement (globalMigration.php/storeMigration.php only switch on create_table/alter_table/insert/add_column/add_index/add_constraint/drop_column/drop_index/drop_constraint/raw_sql/update/multi_sql) - that op would error 'Unknown operation type' on every conductor run rather than apply. The live 'inbound' value present today did not come from that migration executing successfully via conductor; this is a pre-existing issue outside 051 scope, flagged here rather than fixed. This migration deliberately uses type 'alter_table' (proven working, see 20260603_001_payroll_run_status_enums.json) to avoid repeating that mistake.",
    "database": "kiosk_buykiosk",
    "check_query": "SELECT 1 AS exact_match FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='kiosk_buykiosk' AND TABLE_NAME='billingSmsUsage' AND COLUMN_NAME='smsCategory' AND HEX(LOWER(COLUMN_TYPE))='656E756D28276275795F636F6D706C6574696F6E272C27736572766963655F636F6D706C6574696F6E272C27737572766579272C27636861745F7472616E73616374696F6E616C272C27636861745F696E746572616374697665272C276D61726B6574696E67272C27637573746F6D272C27696E626F756E64272C277363686564756C696E675F696E766974652729' AND IS_NULLABLE='NO' AND (COLUMN_DEFAULT IS NULL OR UPPER(COLUMN_DEFAULT)='NULL') AND COLUMN_COMMENT=''",
    "sql": "ALTER TABLE `billingSmsUsage` MODIFY COLUMN `smsCategory` enum('buy_completion','service_completion','survey','chat_transactional','chat_interactive','marketing','custom','inbound','scheduling_invite') NOT NULL"
  },
  {
    "type": "alter_table",
    "description": "Spec 051 T1B.3: extend billingSmsCategoryConfig.smsCategory ENUM with 'scheduling_invite' (additive). Preserves the NOT NULL constraint from the original 036_004 create_table definition.",
    "database": "kiosk_buykiosk",
    "check_query": "SELECT 1 AS exact_match FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='kiosk_buykiosk' AND TABLE_NAME='billingSmsCategoryConfig' AND COLUMN_NAME='smsCategory' AND HEX(LOWER(COLUMN_TYPE))='656E756D28276275795F636F6D706C6574696F6E272C27736572766963655F636F6D706C6574696F6E272C27737572766579272C27636861745F7472616E73616374696F6E616C272C27636861745F696E746572616374697665272C276D61726B6574696E67272C27637573746F6D272C277363686564756C696E675F696E766974652729' AND IS_NULLABLE='NO' AND (COLUMN_DEFAULT IS NULL OR UPPER(COLUMN_DEFAULT)='NULL') AND COLUMN_COMMENT=''",
    "sql": "ALTER TABLE `billingSmsCategoryConfig` MODIFY COLUMN `smsCategory` enum('buy_completion','service_completion','survey','chat_transactional','chat_interactive','marketing','custom','scheduling_invite') NOT NULL"
  },
  {
    "type": "alter_table",
    "description": "Spec 051 T1B.3: extend billingLineItems.smsCategory ENUM with 'scheduling_invite' (additive). Preserves the DEFAULT NULL + comment from the original 036_003 create_table definition (this column is nullable - only populated for SMS line items).",
    "database": "kiosk_buykiosk",
    "check_query": "SELECT 1 AS exact_match FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='kiosk_buykiosk' AND TABLE_NAME='billingLineItems' AND COLUMN_NAME='smsCategory' AND HEX(LOWER(COLUMN_TYPE))='656E756D28276275795F636F6D706C6574696F6E272C27736572766963655F636F6D706C6574696F6E272C27737572766579272C27636861745F7472616E73616374696F6E616C272C27636861745F696E746572616374697665272C276D61726B6574696E67272C27637573746F6D272C277363686564756C696E675F696E766974652729' AND IS_NULLABLE='YES' AND (COLUMN_DEFAULT IS NULL OR UPPER(COLUMN_DEFAULT)='NULL') AND COLUMN_COMMENT='Only for SMS line items'",
    "sql": "ALTER TABLE `billingLineItems` MODIFY COLUMN `smsCategory` enum('buy_completion','service_completion','survey','chat_transactional','chat_interactive','marketing','custom','scheduling_invite') DEFAULT NULL COMMENT 'Only for SMS line items'"
  }
]
