10 lines
326 B
SQL
10 lines
326 B
SQL
CREATE TABLE message_requests (
|
|
chat_id UUID NOT NULL REFERENCES chats(id),
|
|
sender_id UUID NOT NULL REFERENCES users(id),
|
|
key VARCHAR(128) NOT NULL,
|
|
text TEXT NOT NULL,
|
|
message_id UUID REFERENCES messages(id),
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
PRIMARY KEY (chat_id, sender_id, key)
|
|
);
|