mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-06 22:43:10 -06:00
Make SQLite work
This commit is contained in:
parent
5567da100c
commit
fe75cb77d3
|
|
@ -2359,9 +2359,6 @@ func TestReportEvent(t *testing.T) {
|
||||||
eventToReport := room.CreateAndInsert(t, alice, "m.room.message", map[string]interface{}{"body": "hello world"})
|
eventToReport := room.CreateAndInsert(t, alice, "m.room.message", map[string]interface{}{"body": "hello world"})
|
||||||
|
|
||||||
test.WithAllDatabases(t, func(t *testing.T, dbType test.DBType) {
|
test.WithAllDatabases(t, func(t *testing.T, dbType test.DBType) {
|
||||||
if dbType == test.DBTypeSQLite {
|
|
||||||
t.Skip()
|
|
||||||
}
|
|
||||||
cfg, processCtx, close := testrig.CreateConfig(t, dbType)
|
cfg, processCtx, close := testrig.CreateConfig(t, dbType)
|
||||||
routers := httputil.NewRouters()
|
routers := httputil.NewRouters()
|
||||||
cm := sqlutil.NewConnectionManager(processCtx, cfg.Global.DatabaseOptions)
|
cm := sqlutil.NewConnectionManager(processCtx, cfg.Global.DatabaseOptions)
|
||||||
|
|
|
||||||
|
|
@ -26,16 +26,15 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const reportedEventsScheme = `
|
const reportedEventsScheme = `
|
||||||
CREATE SEQUENCE IF NOT EXISTS roomserver_reported_events_id_seq;
|
|
||||||
CREATE TABLE IF NOT EXISTS roomserver_reported_events
|
CREATE TABLE IF NOT EXISTS roomserver_reported_events
|
||||||
(
|
(
|
||||||
id BIGINT PRIMARY KEY DEFAULT nextval('roomserver_reported_events_id_seq'),
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
room_nid BIGINT NOT NULL,
|
room_nid INTEGER NOT NULL,
|
||||||
event_nid BIGINT NOT NULL,
|
event_nid INTEGER NOT NULL,
|
||||||
user_id TEXT NOT NULL,
|
user_id TEXT NOT NULL,
|
||||||
reason TEXT,
|
reason TEXT,
|
||||||
score INTEGER,
|
score INTEGER,
|
||||||
received_ts BIGINT NOT NULL
|
received_ts INTEGER NOT NULL
|
||||||
);`
|
);`
|
||||||
|
|
||||||
const insertReportedEventSQL = `
|
const insertReportedEventSQL = `
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue