Files
medical-mall/pages/mall/analytics/test/SQL_EXECUTION_ORDER.md
2026-01-26 21:34:17 +08:00

16 lines
802 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# SQL 文件执行顺序指南(已弃用)
> 本文件已停止维护,避免与新脚本冲突。
>
> ✅ **请以 `ANALYTICS_DATA_QUICK_START.md` 为唯一权威执行顺序与权限说明文档。**
## 当前推荐执行顺序(摘要)
1. `01_create_tables.sql`(基础业务表 + RLS + 中文注释Drop-first
2. `../../user/test/USER_AUTH_SCHEMA.sql``ak_users` + RLS + 资料函数Drop-first
3. `../../user/test/USER_AUTH_TRIGGER.sql`auth.users → ak_users 触发器)
4. `ANALYTICS_DB_SCHEMA.sql`analytics_* 表 + RLS + RPCDrop-first
5. `02_insert_test_data.sql`(基础表测试数据,需 service_role/postgres
6. `ANALYTICS_TEST_SEED.sql`analytics_* 测试数据,需 service_role/postgres
7. `03_test_queries.sql`(可选:验证查询)