wait for db on firstrun and prefill notifications with migrations

This commit is contained in:
les
2020-11-03 21:20:17 +01:00
parent abde1be657
commit a3624eb60d
3 changed files with 1872 additions and 1984 deletions

View File

@@ -34,8 +34,9 @@ module.exports = {
consola.warn(` ⚠️ ${e}. You can specify configuration path using '--config'`)
}
// sync db
const db = require('./api/models')
await db.authenticate()
const users = await db.user.findAll()
if (users.length) {
consola.warn(' ⚠ Non empty db! Please move your current db elsewhere than retry.')