Add a tiny bit of extra logging to database connection
This commit is contained in:
parent
63b4a8997f
commit
1b6bc94afc
@ -89,7 +89,7 @@ export async function initDatabase(): Promise<DataSource> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`[Database] ${yellow(`connecting to ${DatabaseType} db`)}`);
|
console.log(`[Database] ${yellow(`Connecting to ${DatabaseType} db`)}`);
|
||||||
|
|
||||||
dbConnection = await DataSourceOptions.initialize();
|
dbConnection = await DataSourceOptions.initialize();
|
||||||
|
|
||||||
@ -103,11 +103,10 @@ export async function initDatabase(): Promise<DataSource> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (!(await dbExists())) {
|
if (!(await dbExists())) {
|
||||||
console.log(
|
console.log("[Database] This appears to be a fresh database. Synchronising.");
|
||||||
"[Database] This appears to be a fresh database. Synchronising.",
|
|
||||||
);
|
|
||||||
await dbConnection.synchronize();
|
await dbConnection.synchronize();
|
||||||
} else {
|
} else {
|
||||||
|
console.log("[Database] Applying missing migrations, if any.");
|
||||||
await dbConnection.runMigrations();
|
await dbConnection.runMigrations();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user