[
  {
    "type": "create_table",
    "description": "Create billingSmsCategoryConfig table for per-store SMS category configuration",
    "database": "kiosk_buykiosk",
    "check_query": "SHOW TABLES LIKE 'billingSmsCategoryConfig'",
    "sql": "CREATE TABLE `billingSmsCategoryConfig` (`id` int unsigned NOT NULL AUTO_INCREMENT, `typeNum` varchar(10) NOT NULL COMMENT 'Store identifier', `smsCategory` enum('buy_completion','service_completion','survey','chat_transactional','chat_interactive','marketing','custom') NOT NULL, `billable` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0=included/free, 1=billable', `ratePerMessage` decimal(10,4) NOT NULL DEFAULT 0.0100, `includedFreeCount` int unsigned NOT NULL DEFAULT 0, `isEnabled` tinyint(1) NOT NULL DEFAULT 1, `createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `uq_store_category` (`typeNum`, `smsCategory`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Per-store SMS category billing configuration'"
  }
]
