mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-22 21:53:46 +00:00
Add a tiny bit of extra logging to database connection
This commit is contained in:
1 parent
b8d58dba44
commit
9c77af83b9
1 file changed
+3
-4
@@ -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();
|
||||
|
||||
@@ -103,11 +103,10 @@ export async function initDatabase(): Promise<DataSource> {
|
||||
}
|
||||
};
|
||||
if (!(await dbExists())) {
|
||||
console.log(
|
||||
"[Database] This appears to be a fresh database. Synchronising.",
|
||||
);
|
||||
console.log("[Database] This appears to be a fresh database. Synchronising.");
|
||||
await dbConnection.synchronize();
|
||||
} else {
|
||||
console.log("[Database] Applying missing migrations, if any.");
|
||||
await dbConnection.runMigrations();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user