mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: tweak reaction store
This commit is contained in:
@ -131,3 +131,13 @@ CREATE TABLE webhook (
|
||||
name TEXT NOT NULL,
|
||||
url TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- reaction
|
||||
CREATE TABLE reaction (
|
||||
id SERIAL PRIMARY KEY,
|
||||
created_ts BIGINT NOT NULL DEFAULT EXTRACT(EPOCH FROM NOW()),
|
||||
creator_id INTEGER NOT NULL,
|
||||
content_id TEXT NOT NULL,
|
||||
reaction_type TEXT NOT NULL,
|
||||
UNIQUE(creator_id, content_id, reaction_type)
|
||||
);
|
||||
|
9
store/db/postgres/migration/prod/0.20/00_reaction.sql
Normal file
9
store/db/postgres/migration/prod/0.20/00_reaction.sql
Normal file
@ -0,0 +1,9 @@
|
||||
-- reaction
|
||||
CREATE TABLE reaction (
|
||||
id SERIAL PRIMARY KEY,
|
||||
created_ts BIGINT NOT NULL DEFAULT EXTRACT(EPOCH FROM NOW()),
|
||||
creator_id INTEGER NOT NULL,
|
||||
content_id TEXT NOT NULL,
|
||||
reaction_type TEXT NOT NULL,
|
||||
UNIQUE(creator_id, content_id, reaction_type)
|
||||
);
|
@ -131,3 +131,13 @@ CREATE TABLE webhook (
|
||||
name TEXT NOT NULL,
|
||||
url TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- reaction
|
||||
CREATE TABLE reaction (
|
||||
id SERIAL PRIMARY KEY,
|
||||
created_ts BIGINT NOT NULL DEFAULT EXTRACT(EPOCH FROM NOW()),
|
||||
creator_id INTEGER NOT NULL,
|
||||
content_id TEXT NOT NULL,
|
||||
reaction_type TEXT NOT NULL,
|
||||
UNIQUE(creator_id, content_id, reaction_type)
|
||||
);
|
||||
|
Reference in New Issue
Block a user