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:
@@ -145,6 +145,7 @@ CREATE TABLE webhook (
|
||||
|
||||
CREATE INDEX idx_webhook_creator_id ON webhook (creator_id);
|
||||
|
||||
-- reaction
|
||||
CREATE TABLE reaction (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
created_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),
|
||||
|
9
store/db/sqlite/migration/prod/0.20/00__reaction.sql
Normal file
9
store/db/sqlite/migration/prod/0.20/00__reaction.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- reaction
|
||||
CREATE TABLE reaction (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
created_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),
|
||||
creator_id INTEGER NOT NULL,
|
||||
content_id TEXT NOT NULL,
|
||||
reaction_type TEXT NOT NULL,
|
||||
UNIQUE(creator_id, content_id, reaction_type)
|
||||
);
|
@@ -144,3 +144,13 @@ CREATE TABLE webhook (
|
||||
);
|
||||
|
||||
CREATE INDEX idx_webhook_creator_id ON webhook (creator_id);
|
||||
|
||||
-- reaction
|
||||
CREATE TABLE reaction (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
created_ts BIGINT NOT NULL DEFAULT (strftime('%s', '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