mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
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:
parent
41cb0eec6e
commit
4517c4a90a
|
@ -12,11 +12,11 @@ import type { DatabaseType } from '../Interfaces';
|
||||||
import config from '../../config';
|
import config from '../../config';
|
||||||
import { getConfigValue } from '../GenericHelpers';
|
import { getConfigValue } from '../GenericHelpers';
|
||||||
|
|
||||||
const entitiesDir = path.resolve('src', 'databases', 'entities');
|
const entitiesDir = path.resolve(__dirname, 'entities');
|
||||||
|
|
||||||
const getDBConnectionOptions = (dbType: DatabaseType) => {
|
const getDBConnectionOptions = (dbType: DatabaseType) => {
|
||||||
const entityPrefix = config.getEnv('database.tablePrefix');
|
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 configDBType = dbType === 'mariadb' ? 'mysqldb' : dbType;
|
||||||
const connectionDetails =
|
const connectionDetails =
|
||||||
configDBType === 'sqlite'
|
configDBType === 'sqlite'
|
||||||
|
|
Loading…
Reference in a new issue