mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add history for psdoc,ddoc,drdoc
This commit is contained in:
1 parent
c49970f4be
commit
b8c316c44b
12 files changed
+70
-32
No files matched your search
@@ -6,8 +6,15 @@ export async function connect() {
|
||||
const db = require('hydrooj/src/service/db');
|
||||
db.bus.once('connect', resolve);
|
||||
});
|
||||
const script = require('../src/script/upgrade0_1');
|
||||
await script.run();
|
||||
const modelSystem = require('hydrooj/src/model/system');
|
||||
const scripts = require('hydrooj/src/upgrade');
|
||||
let dbVer = (await modelSystem.get('db.ver')) || 0;
|
||||
const expected = scripts.length;
|
||||
while (dbVer < expected) {
|
||||
await scripts[dbVer]();
|
||||
dbVer++;
|
||||
await modelSystem.set('db.ver', dbVer);
|
||||
}
|
||||
}
|
||||
|
||||
export async function dispose() {
|
||||
|
||||
Reference in new issue
Block a user