[
  {
    "type": "create_table",
    "description": "Create staff_chat_channels table for Staff Chat channels with role-based access",
    "database": "{{store}}",
    "check_query": "SHOW TABLES LIKE 'staff_chat_channels'",
    "sql": "CREATE TABLE `staff_chat_channels` (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `typeNum` varchar(10) NOT NULL,\n  `name` varchar(100) NOT NULL,\n  `description` text DEFAULT NULL,\n  `accessLevel` enum('public','manager','owner') NOT NULL DEFAULT 'public',\n  `isDefault` tinyint(1) NOT NULL DEFAULT 0,\n  `retentionDays` int(10) unsigned DEFAULT NULL COMMENT 'NULL = forever',\n  `createdByEmployeeId` int(10) unsigned DEFAULT NULL,\n  `createdAt` timestamp NOT NULL DEFAULT current_timestamp(),\n  `updatedAt` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `uk_typeNum_name` (`typeNum`, `name`),\n  KEY `idx_typeNum_accessLevel` (`typeNum`, `accessLevel`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Staff Chat channels with role-based access control'"
  }
]
