0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-06-13 09:58:59 +02:00

Make SQLite work

This commit is contained in:
Till Faelligen 2024-03-15 22:48:19 +01:00
parent 5567da100c
commit fe75cb77d3
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E
2 changed files with 4 additions and 8 deletions

View file

@ -2359,9 +2359,6 @@ func TestReportEvent(t *testing.T) {
eventToReport := room.CreateAndInsert(t, alice, "m.room.message", map[string]interface{}{"body": "hello world"})
test.WithAllDatabases(t, func(t *testing.T, dbType test.DBType) {
if dbType == test.DBTypeSQLite {
t.Skip()
}
cfg, processCtx, close := testrig.CreateConfig(t, dbType)
routers := httputil.NewRouters()
cm := sqlutil.NewConnectionManager(processCtx, cfg.Global.DatabaseOptions)

View file

@ -26,16 +26,15 @@ import (
)
const reportedEventsScheme = `
CREATE SEQUENCE IF NOT EXISTS roomserver_reported_events_id_seq;
CREATE TABLE IF NOT EXISTS roomserver_reported_events
(
id BIGINT PRIMARY KEY DEFAULT nextval('roomserver_reported_events_id_seq'),
room_nid BIGINT NOT NULL,
event_nid BIGINT NOT NULL,
id INTEGER PRIMARY KEY AUTOINCREMENT,
room_nid INTEGER NOT NULL,
event_nid INTEGER NOT NULL,
user_id TEXT NOT NULL,
reason TEXT,
score INTEGER,
received_ts BIGINT NOT NULL
received_ts INTEGER NOT NULL
);`
const insertReportedEventSQL = `