mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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
@@ -1,4 +1,3 @@
|
||||
dist
|
||||
*.d.ts
|
||||
*.js
|
||||
node_modules
|
||||
@@ -54,6 +54,8 @@ settings:
|
||||
import/parsers:
|
||||
'@typescript-eslint/parser':
|
||||
- .ts
|
||||
- .js
|
||||
- .jsx
|
||||
import/resolver:
|
||||
typescript:
|
||||
alwaysTryTypes: true
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.21.3",
|
||||
"version": "2.21.4",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -22,7 +22,7 @@ module.exports = {
|
||||
legacyDecorators: true,
|
||||
},
|
||||
babelOptions: {
|
||||
configFile: './babel.config.js',
|
||||
configFile: `${__dirname}/babel.config.js`,
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
|
||||
Reference in new issue
Block a user