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


-- 为 inventory_records 表添加 company_id 字段
ALTER TABLE public.inventory_records ADD COLUMN IF NOT EXISTS company_id UUID REFERENCES public.companies(id) ON DELETE CASCADE;

-- 创建索引优化查询
CREATE INDEX IF NOT EXISTS idx_inventory_records_company_id ON public.inventory_records(company_id);

