fix: Database config should resolve entities and migrations folder relative to it's path (no-changelog) (#4527)
dbconfig should resolve entities and migrations folder relative to itself
This commit is contained in:
committed by
GitHub
parent
41cb0eec6e
commit
4517c4a90a
@@ -12,11 +12,11 @@ import type { DatabaseType } from '../Interfaces';
|
||||
import config from '../../config';
|
||||
import { getConfigValue } from '../GenericHelpers';
|
||||
|
||||
const entitiesDir = path.resolve('src', 'databases', 'entities');
|
||||
const entitiesDir = path.resolve(__dirname, 'entities');
|
||||
|
||||
const getDBConnectionOptions = (dbType: DatabaseType) => {
|
||||
const entityPrefix = config.getEnv('database.tablePrefix');
|
||||
const migrationsDir = path.resolve('src', 'databases', 'migrations', dbType);
|
||||
const migrationsDir = path.resolve(__dirname, 'migrations', dbType);
|
||||
const configDBType = dbType === 'mariadb' ? 'mysqldb' : dbType;
|
||||
const connectionDetails =
|
||||
configDBType === 'sqlite'
|
||||
|
||||
Reference in New Issue
Block a user