init codebase
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE IF NOT EXISTS mutes (
|
||||
community_id uuid NOT NULL REFERENCES communities (id) ON DELETE CASCADE,
|
||||
user_id uuid NOT NULL REFERENCES users (id) ON DELETE CASCADE,
|
||||
expires_at timestamptz,
|
||||
muted_by uuid REFERENCES users (id),
|
||||
created_at timestamptz DEFAULT now(),
|
||||
PRIMARY KEY (community_id, user_id)
|
||||
);
|
||||
--;;
|
||||
CREATE INDEX IF NOT EXISTS idx_mutes_expires
|
||||
ON mutes (expires_at)
|
||||
WHERE expires_at IS NOT NULL;
|
||||
Reference in New Issue
Block a user