[
  {
    "type": "create_table",
    "description": "Create support_edit_suggestions table in global DB for wiki-style edit suggestions that can be reviewed by admins",
    "database": "kiosk_buykiosk",
    "check_query": "SHOW TABLES LIKE 'support_edit_suggestions'",
    "sql": "CREATE TABLE `support_edit_suggestions` (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `articleId` int(10) unsigned NOT NULL COMMENT 'FK to support_articles.id',\n  `userId` int(10) unsigned NOT NULL COMMENT 'FK to kiosk_users.uf_users.id (suggester)',\n  `suggestion` longtext NOT NULL COMMENT 'Suggested markdown content',\n  `section` varchar(255) DEFAULT NULL COMMENT 'Optional section identifier',\n  `notes` text DEFAULT NULL COMMENT 'Note explaining the suggestion',\n  `status` enum('pending','approved','rejected') NOT NULL DEFAULT 'pending' COMMENT 'Review status',\n  `reviewedBy` int(10) unsigned DEFAULT NULL COMMENT 'FK to kiosk_users.uf_users.id (reviewer)',\n  `reviewerNote` text DEFAULT NULL COMMENT 'Note from reviewer',\n  `reviewedAt` timestamp NULL DEFAULT NULL COMMENT 'When reviewed',\n  `createdAt` timestamp NOT NULL DEFAULT current_timestamp(),\n  PRIMARY KEY (`id`),\n  KEY `idx_articleId` (`articleId`),\n  KEY `idx_status` (`status`),\n  KEY `idx_userId` (`userId`),\n  KEY `idx_reviewedBy` (`reviewedBy`),\n  KEY `idx_createdAt` (`createdAt`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Wiki-style edit suggestions from users (global table)'"
  }
]
