Initial implementation of db stuffs
Got the migrations and datastructures in. Next step is building db utility function into the db module or client module
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
DROP TABLE messages;
|
||||
DROP TYPE room_id;
|
||||
@@ -0,0 +1,14 @@
|
||||
-- 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
|
||||
)
|
||||
Reference in New Issue
Block a user