[
  {
    "type": "create_table",
    "description": "Create smsWebhookLog table for webhook audit trail",
    "database": "kiosk_buykiosk",
    "check_query": "SHOW TABLES LIKE 'smsWebhookLog'",
    "sql": "CREATE TABLE `smsWebhookLog` (`id` bigint unsigned NOT NULL AUTO_INCREMENT, `provider` enum('twilio','vonage') NOT NULL, `webhookType` enum('delivery','inbound_cost') NOT NULL, `providerMessageId` varchar(255) DEFAULT NULL, `httpMethod` varchar(10) NOT NULL COMMENT 'GET or POST', `rawPayload` text NOT NULL COMMENT 'Full webhook payload for debugging', `processingResult` enum('success','error','unmatched') NOT NULL, `errorMessage` varchar(500) DEFAULT NULL, `processingTimeMs` int unsigned DEFAULT NULL, `createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_provider_msg` (`providerMessageId`), KEY `idx_created` (`createdAt`), KEY `idx_result` (`processingResult`, `createdAt`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='SMS webhook processing audit log'"
  }
]
