fix(cli): app start before sync and upgrade

This commit is contained in:
chenos 2022-07-01 09:36:35 +08:00
parent 9928424f5a
commit 5603faacf3
2 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@ export default (app: Application) => {
const [opts] = cliArgs;
console.log('db sync...');
const force = false;
await app.start();
await app.db.sync({
force,
alter: {

View File

@ -10,6 +10,7 @@ export default (app: Application) => {
.action(async (...cliArgs) => {
const [opts] = cliArgs;
console.log('upgrading...');
await app.start();
await app.upgrade();
await app.stop({
cliArgs,