mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix connection error for case database not running
This commit is contained in:
parent
8326eaac95
commit
66324fe1ca
@ -26,8 +26,11 @@ const DB_VERSION = '0001-init_db'
|
||||
|
||||
async function main() {
|
||||
// open mysql connection
|
||||
const con = await connection()
|
||||
if (!con.isConnected) {
|
||||
let con = null
|
||||
try {
|
||||
con = await connection()
|
||||
} catch (error) {}
|
||||
if (!con || !con.isConnected) {
|
||||
throw new Error(`Couldn't open connection to database`)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user