migrate: add lock

This commit is contained in:
undefined committed 2025-01-10 16:30:47 +08:00
1 parent 71ffb24bb1
commit a63a20cd3d
3 files changed
+19 -6

No files matched your search

+2
View File
@@ -80,6 +80,7 @@ export async function run({
const target = await DomainModel.get(domainId);
if (!target) throw new NotFoundError(domainId);
report({ message: 'Connected to database' });
await SystemModel.set('migrate.lock', 'hustoj');
/*
user_id varchar 20 N 用户id(主键)
email varchar 100 Y 用户E-mail
@@ -349,5 +350,6 @@ hydrooj install https://hydro.ac/hydroac-client.zip
}
await ProblemModel.addTestdata(domainId, pdoc.docId, 'config.yaml', Buffer.from(pdoc.config as string));
}
await SystemModel.set('migrate.lock', 0);
return true;
}