[
  {
    "type": "create_table",
    "description": "Create storesAiPrefs table for per-store AI scheduling preferences (Spec 026)",
    "database": "{{store}}",
    "check_query": "SHOW TABLES LIKE 'storesAiPrefs'",
    "sql": "CREATE TABLE `storesAiPrefs` (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `defaultPriorities` text DEFAULT NULL COMMENT 'JSON array of optimization priority strings',\n  `customInstructions` text DEFAULT NULL COMMENT 'Custom instructions for AI scheduling',\n  `includeOwnerIds` text DEFAULT NULL COMMENT 'JSON array of owner user IDs to include',\n  `excludeFromScheduling` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Whether AI scheduling is disabled for this store',\n  `createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  `updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Store-level AI scheduling preferences (Spec 026)'"
  }
]
