mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 19:33:09 -06:00
sqlite bug fixes
This commit is contained in:
parent
086b9164f5
commit
370816c21c
|
|
@ -206,8 +206,10 @@ func (s *publicRoomsStatements) selectPublicRooms(
|
|||
return rooms, err
|
||||
}
|
||||
|
||||
if err := json.Unmarshal([]byte(aliasesJSON), &r.Aliases); err != nil {
|
||||
return rooms, err
|
||||
if len(aliasesJSON) > 0 {
|
||||
if err := json.Unmarshal([]byte(aliasesJSON), &r.Aliases); err != nil {
|
||||
return rooms, err
|
||||
}
|
||||
}
|
||||
|
||||
rooms = append(rooms, r)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const eventsSchema = `
|
|||
depth INTEGER NOT NULL,
|
||||
event_id TEXT NOT NULL UNIQUE,
|
||||
reference_sha256 BLOB NOT NULL,
|
||||
auth_event_nids TEXT NOT NULL DEFAULT '{}'
|
||||
auth_event_nids TEXT NOT NULL DEFAULT '[]'
|
||||
);
|
||||
`
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ const roomsSchema = `
|
|||
CREATE TABLE IF NOT EXISTS roomserver_rooms (
|
||||
room_nid INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
room_id TEXT NOT NULL UNIQUE,
|
||||
latest_event_nids TEXT NOT NULL DEFAULT '{}',
|
||||
latest_event_nids TEXT NOT NULL DEFAULT '[]',
|
||||
last_event_sent_nid INTEGER NOT NULL DEFAULT 0,
|
||||
state_snapshot_nid INTEGER NOT NULL DEFAULT 0,
|
||||
room_version INTEGER NOT NULL DEFAULT 1
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ const stateSnapshotSchema = `
|
|||
CREATE TABLE IF NOT EXISTS roomserver_state_snapshots (
|
||||
state_snapshot_nid INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
room_nid INTEGER NOT NULL,
|
||||
state_block_nids TEXT NOT NULL DEFAULT '{}'
|
||||
state_block_nids TEXT NOT NULL DEFAULT '[]'
|
||||
);
|
||||
`
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue