mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix upgrade script
This commit is contained in:
1 parent
8ddbc8f944
commit
d2e18ff3d5
2 files changed
+3
-5
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable no-sequences */
|
/* eslint-disable no-sequences */
|
||||||
import { basename } from 'path';
|
|
||||||
import { unlinkSync } from 'fs';
|
import { unlinkSync } from 'fs';
|
||||||
|
import { basename } from 'path';
|
||||||
import { STATUS } from '@hydrooj/utils/lib/status';
|
import { STATUS } from '@hydrooj/utils/lib/status';
|
||||||
import checkers from '../checkers';
|
import checkers from '../checkers';
|
||||||
import compile, { compileChecker, compileValidator } from '../compile';
|
import compile, { compileChecker, compileValidator } from '../compile';
|
||||||
|
|||||||
@@ -439,10 +439,7 @@ const scripts: UpgradeScript[] = [
|
|||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
async function _64_65() {
|
null,
|
||||||
await system.set('server.center', 'https://hydro.ac/center');
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
async function _65_66() {
|
async function _65_66() {
|
||||||
return await iterateAllDomain(async (ddoc) => {
|
return await iterateAllDomain(async (ddoc) => {
|
||||||
Object.keys(ddoc.roles).forEach((role) => {
|
Object.keys(ddoc.roles).forEach((role) => {
|
||||||
@@ -472,6 +469,7 @@ const scripts: UpgradeScript[] = [
|
|||||||
endPointForUser,
|
endPointForUser,
|
||||||
endPointForJudge,
|
endPointForJudge,
|
||||||
});
|
});
|
||||||
|
await system.set('db.ver', 67);
|
||||||
await sleep(1000);
|
await sleep(1000);
|
||||||
logger.info('Upgrade done. please restart the server.');
|
logger.info('Upgrade done. please restart the server.');
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
|
|||||||
Reference in new issue
Block a user