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

@@ -16,7 +16,7 @@ CREATE POLICY ml_article_categories_select_active
ON public.ml_article_categories
FOR SELECT
TO anon, authenticated
USING (status = 1);
USING (status = 1 AND deleted_at IS NULL);
-- 3. 文章表策略:允许所有人读取已发布的文章
DROP POLICY IF EXISTS ml_articles_select_published ON public.ml_articles;
@@ -24,6 +24,6 @@ CREATE POLICY ml_articles_select_published
ON public.ml_articles
FOR SELECT
TO anon, authenticated
USING (status = 1);
USING (status = 1 AND deleted_at IS NULL);
-- 默认不开放 INSERT/UPDATE/DELETE 给普通用户,管理端操作通过 RPC (SECURITY DEFINER) 执行