-- 清理已逻辑删除户外招聘会遗留的展位副本和预定记录。
-- 可重复执行：删除目标为空时不会产生任何变更。

DELETE FROM shz.cms_outdoor_fair_booth_booking AS booking
USING shz.cms_outdoor_fair AS fair
WHERE booking.fair_id = fair.id
  AND fair.del_flag <> '0';

DELETE FROM shz.cms_outdoor_fair_booth AS booth
USING shz.cms_outdoor_fair AS fair
WHERE booth.fair_id = fair.id
  AND fair.del_flag <> '0';
