From 0cd6a40304092309f0bbec1cfe2bac8e398d741d Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 29 Dec 2021 12:59:25 +0100 Subject: [PATCH] try with path.join --- database/src/helpers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database/src/helpers.ts b/database/src/helpers.ts index 199af5f7f..eba909a3d 100644 --- a/database/src/helpers.ts +++ b/database/src/helpers.ts @@ -1,6 +1,7 @@ import CONFIG from './config' import { createPool, PoolConfig } from 'mysql' import { Migration } from 'ts-mysql-migrate' +import path from 'path' const poolConfig: PoolConfig = { host: CONFIG.DB_HOST, @@ -18,7 +19,7 @@ const migration = new Migration({ conn: pool, tableName: CONFIG.MIGRATIONS_TABLE, silent: true, - dir: CONFIG.MIGRATIONS_DIRECTORY, + dir: path.join(__dirname, '..', CONFIG.MIGRATIONS_DIRECTORY), }) const initialize = async (): Promise => {