From b6c66dd2daf2d24b867680773482e52697809bc3 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 28 Dec 2021 17:47:43 +0100 Subject: [PATCH] try relative path to migrations --- database/src/config/index.ts | 2 +- database/src/helpers.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/database/src/config/index.ts b/database/src/config/index.ts index 86f96b9b6..98fae114f 100644 --- a/database/src/config/index.ts +++ b/database/src/config/index.ts @@ -13,7 +13,7 @@ const database = { const migrations = { MIGRATIONS_TABLE: process.env.MIGRATIONS_TABLE || 'migrations', - MIGRATIONS_DIRECTORY: process.env.MIGRATIONS_DIRECTORY || '@migrations/', + MIGRATIONS_DIRECTORY: process.env.MIGRATIONS_DIRECTORY || '../database/migrations/', } const CONFIG = { ...database, ...migrations } diff --git a/database/src/helpers.ts b/database/src/helpers.ts index 199af5f7f..821d1e5c4 100644 --- a/database/src/helpers.ts +++ b/database/src/helpers.ts @@ -2,6 +2,8 @@ import CONFIG from './config' import { createPool, PoolConfig } from 'mysql' import { Migration } from 'ts-mysql-migrate' +console.log(__dirname) + const poolConfig: PoolConfig = { host: CONFIG.DB_HOST, port: CONFIG.DB_PORT,