mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: fix database upgrade
This commit is contained in:
1 parent
8621d55bb6
commit
8a8da0fba4
5 files changed
+5
-4
No files matched your search
@@ -71,7 +71,7 @@ export async function load(call: Entry) {
|
||||
const scripts = require('../upgrade');
|
||||
let dbVer = (await modelSystem.get('db.ver')) ?? 0;
|
||||
const isFresh = !dbVer;
|
||||
const expected = scripts.length;
|
||||
const expected = scripts.default.length;
|
||||
while (dbVer < expected) {
|
||||
logger.info('Upgrading database: from %d to %d', dbVer, expected);
|
||||
if (isFresh) {
|
||||
|
||||
Reference in new issue
Block a user