Skip to content

Commit 2efa8d6

Browse files
committed
updated mikroORM calls in service files, not currently running
1 parent 23b30fc commit 2efa8d6

20 files changed

Lines changed: 1923 additions & 1701 deletions

mikro-orm.postgres.cli-config.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { Options } from '@mikro-orm/core';
2+
import { PostgreSqlDriver } from '@mikro-orm/postgresql';
3+
4+
export default {
5+
name: 'postgre',
6+
driver: PostgreSqlDriver,
7+
host: 'localhost',
8+
port: 5432,
9+
user: 'postgres',
10+
// default credential used for cli migration generation against a local debugging instance of postgres
11+
// This is overriden in application startup in the mikro-orm module initiation with configuration values
12+
password: 'Password123',
13+
dbName: 'postgres',
14+
entities: ['src/dal/entity/**/*.*.*'],
15+
migrations: {
16+
path: 'src/dal/migrations/postgres',
17+
pattern: /^[\w-]+\d+|\d\.ts$/,
18+
transactional: true,
19+
},
20+
debug: true,
21+
} as Options;

mikro-orm.postgres.config.js

Lines changed: 0 additions & 19 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
const mikroOrmSqliteConfig = {
2-
type: 'sqlite',
3-
contextName: 'sqliteConfig',
1+
import { BetterSqliteDriver } from '@mikro-orm/better-sqlite';
2+
import { Options } from '@mikro-orm/core';
3+
import { Migrator } from '@mikro-orm/migrations';
4+
5+
export default {
46
name: 'sqlite',
7+
driver: BetterSqliteDriver,
8+
extensions: [Migrator],
59
dbName: './data/sqlite3.db',
610
entities: ['./src/dal/entity/**/*.*.*'],
711
entitiesTs: ['./dist/dal/entity/**/*.*.*'],
812
migrations: {
913
path: './dist/dal/migrations/sqlite',
1014
pathTs: './src/dal/migrations/sqlite',
1115
transactional: true,
12-
snapshot: false // see https://github.com/mikro-orm/mikro-orm/issues/2710
1316
},
1417
debug: true,
15-
};
16-
17-
module.exports = mikroOrmSqliteConfig;
18+
} as Options;

0 commit comments

Comments
 (0)