init
This commit is contained in:
@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS messages;
|
@ -0,0 +1,8 @@
|
||||
CREATE TABLE IF NOT EXISTS messages (
|
||||
chat_id UUID, -- Partition key
|
||||
user_id UUID,
|
||||
content text, -- Clustering column
|
||||
type text, -- Clustering column
|
||||
created_at timestamp, -- Clustering column
|
||||
PRIMARY KEY (chat_id, created_at, content, type)
|
||||
) WITH CLUSTERING ORDER BY (created_at DESC);
|
@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS user_chats;
|
@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS user_chats (
|
||||
user_id UUID, -- Partition key
|
||||
chat_id UUID, -- Clustering column
|
||||
blocked boolean,
|
||||
created_at timestamp,
|
||||
PRIMARY KEY (user_id, created_at, chat_id, blocked)
|
||||
);
|
Reference in New Issue
Block a user