Improved database schema

- Some queries are faster due to better index ordering
- Database is smaller thanks to splitting message_channel table and
  adding WITHOUT ROWID where helpful
This commit is contained in:
Cadence Ember 2023-08-28 17:32:55 +12:00
parent 21156446ee
commit fcbb045cbb
11 changed files with 114 additions and 93 deletions

View file

@ -8,7 +8,8 @@ const config = require("../config")
const passthrough = require("../passthrough")
const db = new sqlite(":memory:")
db.exec(fs.readFileSync("db/data-for-test.sql", "utf8"))
db.exec(fs.readFileSync("db/ooye-schema.sql", "utf8"))
db.exec(fs.readFileSync("db/ooye-test-data.sql", "utf8"))
const sync = new HeatSync({watchFS: false})