pull in ruma so I do not have to write all requests and responses myself
Some checks failed
continuous-integration/drone Build is failing

This commit is contained in:
2022-06-26 01:13:42 +02:00
parent ba84efd384
commit 71590d6c60
22 changed files with 655 additions and 33 deletions

View File

@@ -0,0 +1,8 @@
-- Add migration script here
CREATE TABLE rooms(
uuid TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL
);
CREATE UNIQUE INDEX name_index ON rooms(name);

View File

@@ -0,0 +1,13 @@
-- Add migration script here
CREATE TABLE events(
uuid TEXT PRIMARY KEY NOT NULL,
room_uuid TEXT NOT NULL,
type TEXT NOT NULL,
state_key TEXT,
sender_uuid TEXT NOT NULL,
origin_server_ts INT NOT NULL,
content TEXT NOT NULL,
FOREIGN KEY(room_uuid) REFERENCES rooms(uuid),
FOREIGN KEY(sender_uuid) REFERENCES users(uuid)
);