try relative path to migrations

This commit is contained in:
Moriz Wahl 2021-12-28 17:47:43 +01:00
parent 5c79d34ef3
commit b6c66dd2da
2 changed files with 3 additions and 1 deletions

View File

@ -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 }

View File

@ -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,