Add database implementation of channel message change tracking

This commit is contained in:
Mikayla 2023-10-01 21:31:36 -07:00
parent e0ff7ba180
commit 51cf6a5ff3
No known key found for this signature in database
9 changed files with 339 additions and 19 deletions

View file

@ -300,3 +300,12 @@ CREATE TABLE "observed_buffer_edits" (
);
CREATE UNIQUE INDEX "index_observed_buffers_user_and_buffer_id" ON "observed_buffer_edits" ("user_id", "buffer_id");
CREATE TABLE IF NOT EXISTS "observed_channel_messages" (
"user_id" INTEGER NOT NULL REFERENCES users (id) ON DELETE CASCADE,
"channel_id" INTEGER NOT NULL REFERENCES channels (id) ON DELETE CASCADE,
"channel_message_id" INTEGER NOT NULL,
PRIMARY KEY (user_id, channel_id)
);
CREATE UNIQUE INDEX "index_observed_channel_messages_user_and_channel_id" ON "observed_channel_messages" ("user_id", "channel_id");