From a068d10faaaa14c46fd6e1cde0349130a7e16611 Mon Sep 17 00:00:00 2001 From: Dmitry Anderson <4nd3r5z0n@gmail.com> Date: Sat, 19 Oct 2024 12:14:06 +0200 Subject: [PATCH] Migrations config fix --- config.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config.ts b/config.ts index bc712ef..263833d 100644 --- a/config.ts +++ b/config.ts @@ -2,6 +2,7 @@ import type { PoolConfig } from "npm:@types/pg"; import { getConfig } from "./cfg/config.ts"; import type { BotConfig, CompiledConfig } from "./cfg/config.ts"; import { BotMode } from "./cfg/bot.ts"; +import * as path from "jsr:@std/path"; const MIC_CHAT_ID = -1002438254268 const MR_ANDERSON_ID = 1843444763 @@ -32,7 +33,10 @@ export const reloadConfig = (): CompiledConfig => { } return { pgPoolCfg, botCfg, - dropDb: cfg.drop_db, - applyMigrations: cfg.apply_migrations + migrationCfg: { + dropDb: cfg.drop_db, + applyMigrations: cfg.apply_migrations, + migrationsPath: path.join(__dirname, "migrations"), + } } } \ No newline at end of file