d71b10f89c
Handlers now exist for user creation, auth, state messages, and post messages. Still need to do group permissions and messages
16 lines
367 B
SQL
16 lines
367 B
SQL
-- Your SQL goes here
|
|
CREATE TYPE room_id AS (
|
|
coordinates bigint[],
|
|
server text
|
|
);
|
|
CREATE TABLE messages (
|
|
id BIGSERIAL PRIMARY KEY,
|
|
room room_id NOT NULL,
|
|
body TEXT NOT NULL,
|
|
signature TEXT NOT NULL,
|
|
client_timestamp BIGINT NOT NULL,
|
|
server_timestamp BIGINT NOT NULL,
|
|
username user_t NOT NULL,
|
|
edited BOOLEAN DEFAULT false
|
|
)
|