From: Jérôme Benoit Date: Sat, 13 Jan 2024 14:56:24 +0000 (+0100) Subject: fix: update mikro-orm.config.ts template for version 6 X-Git-Tag: v1.2.32~22 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d5f64697c0471d8f8873f97163fd15b2a2ceabf0;p=e-mobility-charging-stations-simulator.git fix: update mikro-orm.config.ts template for version 6 Signed-off-by: Jérôme Benoit --- diff --git a/mikro-orm.config-template.ts b/mikro-orm.config-template.ts index 8b01a42c..ddfcb4c3 100644 --- a/mikro-orm.config-template.ts +++ b/mikro-orm.config-template.ts @@ -1,17 +1,10 @@ -import { dirname, join } from 'node:path' -import { fileURLToPath } from 'node:url' - -import { TsMorphMetadataProvider } from '@mikro-orm/reflection' +import { defineConfig } from '@mikro-orm/sqlite' import { PerformanceData, PerformanceRecord } from './src/types/index.js' import { Constants } from './src/utils/index.js' -export default { - metadataProvider: TsMorphMetadataProvider, +export default defineConfig({ + dbName: `${Constants.DEFAULT_PERFORMANCE_RECORDS_DB_NAME}.db`, entities: [PerformanceRecord, PerformanceData], - type: 'sqlite', - clientUrl: `file://${join( - dirname(fileURLToPath(import.meta.url)), - `${Constants.DEFAULT_PERFORMANCE_RECORDS_DB_NAME}.db` - )}` -} + debug: true +})