admin的数据库文件补全,修复uvue中的数据库接入bug

This commit is contained in:
comlibmb
2026-02-25 10:02:50 +08:00
parent 5d00e3d74e
commit dc8f899610
40 changed files with 1629 additions and 625 deletions

View File

@@ -8,12 +8,12 @@
ALTER TABLE public.ml_invoices ENABLE ROW LEVEL SECURITY;
-- 策略 1: 允许用户读取自己的记录
-- 策略 1: 允许用户读取自己的记录(仅未删除数据)
DROP POLICY IF EXISTS ml_invoices_user_select ON public.ml_invoices;
CREATE POLICY ml_invoices_user_select
ON public.ml_invoices
FOR SELECT
TO authenticated
USING (uid = auth.uid());
USING (uid = auth.uid() AND deleted_at IS NULL);
-- 默认不开放 INSERT/UPDATE/DELETE 给普通用户,通常由 RPC 或支付后逻辑触发