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

DROP POLICY IF EXISTS users_select_yarn_ratios ON public.yarn_ratios; CREATE POLICY users_select_yarn_ratios ON public.yarn_ratios FOR SELECT USING (EXISTS (SELECT 1 FROM public.production_plans WHERE id = plan_id AND (purchaser_id = public.get_user_master_company_id() OR EXISTS (SELECT 1 FROM public.plan_factories WHERE plan_id = production_plans.id AND factory_id = public.get_user_master_company_id()))));
