fix: 给有 FK 依赖的建表脚本加数字前缀以保证字母序就是依赖序

This commit is contained in:
zetaloop
2026-05-03 07:31:12 +08:00
parent 22c7c4e7d9
commit 631469a713
16 changed files with 0 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
CREATE TABLE comment_likes
(
id BIGINT PRIMARY KEY,
comment_id BIGINT NOT NULL,
user_id BIGINT NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
UNIQUE (comment_id, user_id)
);
CREATE INDEX idx_comment_likes_lookup ON comment_likes (user_id, comment_id);