10 lines
270 B
MySQL
10 lines
270 B
MySQL
|
|
CREATE TABLE messages (
|
||
|
|
room_id uuid,
|
||
|
|
bucket_day date,
|
||
|
|
ts bigint,
|
||
|
|
msg_id uuid,
|
||
|
|
uid text,
|
||
|
|
content text,
|
||
|
|
PRIMARY KEY ((room_id, bucket_day), ts, msg_id)
|
||
|
|
) WITH CLUSTERING ORDER BY (ts ASC);
|