chore: initial commit
This commit is contained in:
12
internal/db/schema/post_viewers.sql
Normal file
12
internal/db/schema/post_viewers.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE post_viewers
|
||||
(
|
||||
post_id INTEGER NOT NULL,
|
||||
ip INET NOT NULL,
|
||||
last_viewed_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
|
||||
PRIMARY KEY(post_id, ip)
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN post_viewers.post_id IS '文章id';
|
||||
COMMENT ON COLUMN post_viewers.ip IS '访问ip';
|
||||
COMMENT ON COLUMN post_viewers.last_viewed_at IS '最后访问时间';
|
||||
Reference in New Issue
Block a user