Skip to content

Commit

Permalink
added tables to mark messages as false negative (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Szer authored Jul 20, 2024
1 parent d45ae3f commit 7682298
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/migrations/V6__false-banned.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CREATE TABLE false_positive_users
(
user_id BIGINT PRIMARY KEY
REFERENCES "user" (id) ON DELETE CASCADE
);

CREATE TABLE false_positive_messages
(
chat_id BIGINT NOT NULL,
message_id INT NOT NULL,
PRIMARY KEY (chat_id, message_id),
FOREIGN KEY (chat_id, message_id) REFERENCES "message" (chat_id, message_id) ON DELETE CASCADE
);

CREATE TABLE false_negative_messages
(
chat_id BIGINT NOT NULL,
message_id INT NOT NULL,
PRIMARY KEY (chat_id, message_id),
FOREIGN KEY (chat_id, message_id) REFERENCES "message" (chat_id, message_id) ON DELETE CASCADE
);

0 comments on commit 7682298

Please sign in to comment.