cfg: change psql schema

This commit is contained in:
Flummi 2022-05-07 19:08:55 +02:00
parent 1787a69143
commit 872abd7f73

View File

@ -2,4 +2,9 @@
import postgres from "postgres"; import postgres from "postgres";
import cfg from "./config.mjs"; import cfg from "./config.mjs";
export default postgres(cfg.sql); const db = postgres(cfg.sql);
if(cfg.sql.schema)
await db.unsafe(`set schema '${cfg.sql.schema}';`);
export default db;