正在显示
1 个修改的文件
包含
52 行增加
和
2 行删除
1 | -- 用户表 | 1 | -- 用户表 |
2 | -- (公司ID)索引 | 2 | -- (公司ID)索引 |
3 | CREATE INDEX IF NOT EXISTS idx_user_company_id ON "public"."user" USING btree(company_id); | 3 | CREATE INDEX IF NOT EXISTS idx_user_company_id ON "public"."user" USING btree(company_id); |
4 | + | ||
4 | -- (手机号)索引 | 5 | -- (手机号)索引 |
5 | CREATE INDEX IF NOT EXISTS idx_user_phone ON "public"."user" USING btree(phone); | 6 | CREATE INDEX IF NOT EXISTS idx_user_phone ON "public"."user" USING btree(phone); |
6 | 7 | ||
7 | -- 用户关注表 | 8 | -- 用户关注表 |
8 | -- (发起人)索引 | 9 | -- (发起人)索引 |
9 | -CREATE INDEX IF NOT EXISTS idx_user_follow_from_user_id on "public".user_follow USING btree(from_user_id); | 10 | +CREATE INDEX IF NOT EXISTS idx_user_follow_from_user_id ON "public".user_follow USING btree(from_user_id); |
10 | 11 | ||
11 | -- 角色表 | 12 | -- 角色表 |
12 | -- (公司ID)索引 | 13 | -- (公司ID)索引 |
13 | -CREATE INDEX IF NOT EXISTS idx_role_company_id ON "public"."role" USING btree(company_id); | ||
14 | +CREATE INDEX IF NOT EXISTS idx_role_company_id ON "public"."role" USING btree(company_id); | ||
15 | + | ||
16 | +-- 文章表 | ||
17 | +-- (公司ID)索引 | ||
18 | +CREATE INDEX article_company_id_idx ON public.article(company_id); | ||
19 | + | ||
20 | +-- 文章与标签关系表 | ||
21 | +-- (公司ID)索引 | ||
22 | +CREATE INDEX article_and_tag_company_id_idx ON public.article_and_tag(company_id); | ||
23 | + | ||
24 | +-- 文章历史记录 | ||
25 | +-- (公司ID)索引 | ||
26 | +CREATE INDEX article_backup_company_id_idx ON public.article_backup(company_id); | ||
27 | + | ||
28 | +-- 文章的评论记录 | ||
29 | +-- (公司ID)索引 | ||
30 | +CREATE INDEX article_comment_company_id_idx ON public.article_comment(company_id); | ||
31 | + | ||
32 | +-- 文章的草稿箱记录 | ||
33 | +-- (公司ID)索引 | ||
34 | +CREATE INDEX article_draft_company_id_idx ON public.article_draft(company_id); | ||
35 | + | ||
36 | +-- 文章的段落内容 | ||
37 | +-- (公司ID)索引 | ||
38 | +CREATE INDEX article_section_company_id_idx ON public.article_section(company_id); | ||
39 | + | ||
40 | +-- 文章的段落内容 | ||
41 | +-- (文章ID)索引 | ||
42 | +CREATE INDEX article_section_article_id_idx ON public.article_section(article_id); | ||
43 | + | ||
44 | +-- 标签 | ||
45 | +-- (公司ID)索引 | ||
46 | +CREATE INDEX article_tag_company_id_idx ON public.article_tag(company_id); | ||
47 | + | ||
48 | +-- 人员点赞标识 | ||
49 | +-- (评论id)索引 | ||
50 | +CREATE INDEX user_love_flag_comment_id_idx ON public.user_love_flag(comment_id); | ||
51 | + | ||
52 | +-- 人员点赞标识 | ||
53 | +-- (用户id)索引 | ||
54 | +CREATE INDEX user_love_flag_user_id_idx ON public.user_love_flag(user_id); | ||
55 | + | ||
56 | +-- 标记人员已浏览的文章 | ||
57 | +-- (公司ID)索引 | ||
58 | +CREATE INDEX user_read_article_company_id_idx ON public.user_read_article(company_id); | ||
59 | + | ||
60 | +-- 标记人员已浏览的文章 | ||
61 | +-- (用户id)索引 | ||
62 | +CREATE INDEX user_read_article_user_id_idx ON public.user_read_article(user_id); | ||
63 | + |
-
请 注册 或 登录 后发表评论