-- ============================================================
-- org_id 策略修复 — 测试数据清理（验证完成后执行）
-- 目标库：192.168.3.12:3307 / cw-elevator-application
-- 执行：mysql -h 192.168.3.12 -P 3307 -u root -p123456 cw-elevator-application < test_data_cleanup.sql
-- ============================================================

DELETE FROM tenant_visitor_floor_policy WHERE id IN ('policy_t1_1403', 'policy_t3_invalid', 'policy_t5_disabled');

UPDATE tenant_visitor_floor_policy SET org_id = NULL WHERE id = 'gf_vstr_policy_guangfa_fund_001x';

-- 验证清理结果（应返回空集或 org_id=NULL）
SELECT id, org_id, enabled FROM tenant_visitor_floor_policy
WHERE id IN ('policy_t1_1403', 'policy_t3_invalid', 'policy_t5_disabled', 'gf_vstr_policy_guangfa_fund_001x');
