Files
2026-02-17 17:30:45 -05:00

7 lines
277 B
SQL

CREATE TABLE IF NOT EXISTS mentions (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
message_id uuid NOT NULL REFERENCES messages (id) ON DELETE CASCADE,
target_type text NOT NULL CHECK (target_type IN ('user', 'channel', 'here')),
target_id uuid
);