-- ============================================
-- 此文件由 Meoo Cloud 自动生成，请勿修改
-- This file is auto-generated by Meoo Cloud, DO NOT MODIFY
-- ============================================


-- 1. 删除 PLAN-2026-820523 的重复工厂关联，只保留示例纺织厂
DELETE FROM plan_factories 
WHERE plan_id = '7b0d76c2-0bf3-4a58-8607-4dfa850cf416' 
AND factory_id = '2da8c512-6076-44e1-8f37-def2298b5847';

-- 2. 检查是否还有其他重复关联
SELECT plan_id, factory_type, COUNT(*) 
FROM plan_factories 
GROUP BY plan_id, factory_type 
HAVING COUNT(*) > 1;

