Migrations config fix

This commit is contained in:
Dmitry Anderson 2024-10-19 12:14:06 +02:00
parent 0bd90dac76
commit a068d10faa

View File

@ -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"),
}
}
}