mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix
This commit is contained in:
1 parent
8a8da0fba4
commit
fb47598c57
2 files changed
+3
-3
No files matched your search
@@ -68,10 +68,10 @@ export async function load(call: Entry) {
|
||||
storage.start(sopts);
|
||||
require('../service/monitor');
|
||||
for (const i of builtinModel) require(`../model/${i}`);
|
||||
const scripts = require('../upgrade');
|
||||
const scripts = require('../upgrade').default;
|
||||
let dbVer = (await modelSystem.get('db.ver')) ?? 0;
|
||||
const isFresh = !dbVer;
|
||||
const expected = scripts.default.length;
|
||||
const expected = scripts.length;
|
||||
while (dbVer < expected) {
|
||||
logger.info('Upgrading database: from %d to %d', dbVer, expected);
|
||||
if (isFresh) {
|
||||
|
||||
Reference in new issue
Block a user