summaryrefslogtreecommitdiff
path: root/migrations/20250819.php
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2025-09-19 14:29:17 +0200
committerDaniel Weipert <git@mail.dweipert.de>2025-09-19 14:29:17 +0200
commit2ae0c2fa2a0bb5a7cd1fd9da1c6d2a6090126e67 (patch)
treef8cd230b33f36cbee57df276e52f1d393c296e13 /migrations/20250819.php
parenta20d44d64f02f86d23cba1f1a886352c5f744a1a (diff)
sending messages creates message event in database
Diffstat (limited to 'migrations/20250819.php')
-rw-r--r--migrations/20250819.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/migrations/20250819.php b/migrations/20250819.php
index 5e4eaa4..a0cfd19 100644
--- a/migrations/20250819.php
+++ b/migrations/20250819.php
@@ -54,3 +54,24 @@ Database::getInstance()->query(<<<SQL
"name" varchar(255) not null
);
SQL);
+
+Database::getInstance()->query(<<<SQL
+ create table if not exists "room_events" (
+ "id" varchar(255) primary key,
+
+ "type" varchar(255) not null,
+ "sender" varchar(255) not null,
+
+ "origin_server_timestamp" timestamptz(3) not null,
+
+ "data" json,
+ "content" json,
+ "unsigned" json,
+
+ "previous_event_id" varchar(255),
+ "room_id" varchar(255) not null,
+
+ foreign key (previous_event_id) references room_events(id),
+ foreign key (room_id) references rooms(id)
+ );
+SQL);