1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2025-12-18 03:58:49 +00:00

Ability to store request history in database

This commit is contained in:
Cadence Ember
2020-04-17 01:14:27 +12:00
parent a6e7252566
commit 5a3eac338a
3 changed files with 20 additions and 2 deletions

View File

@@ -38,7 +38,18 @@ const deltas = new Map([
db.prepare("ALTER TABLE Users_New RENAME TO Users")
.run()
})()
}],
// version 2 to version 3
[3, function() {
db.transaction(() => {
db.prepare("DROP TABLE IF EXISTS RequestHistory")
.run()
db.prepare("CREATE TABLE RequestHistory (type TEXT NOT NULL, success INTEGER NOT NULL, timestamp INTEGER NOT NULL)")
.run()
})()
}]
])
module.exports = async function() {