From 14e3c33cc5f4c70fccea1ea4a5d81173d07b975f Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 12 Oct 2021 01:27:20 +0200 Subject: [PATCH] more error logging for debugging purposes --- backend/src/typeorm/getDBVersion.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/typeorm/getDBVersion.ts b/backend/src/typeorm/getDBVersion.ts index 104ac124c..a64a6c2b7 100644 --- a/backend/src/typeorm/getDBVersion.ts +++ b/backend/src/typeorm/getDBVersion.ts @@ -1,10 +1,13 @@ +import { getRepository } from 'typeorm' import { Migration } from '@entity/Migration' const getDBVersion = async (): Promise => { try { - const dbVersion = await Migration.findOne({ order: { version: 'DESC' } }) + const dbVersion = await getRepository(Migration).findOne({ order: { version: 'DESC' } }) return dbVersion ? dbVersion.fileName : null } catch (error) { + // eslint-disable-next-line no-console + console.log(error) return null } }