cfg: change psql schema
This commit is contained in:
parent
1787a69143
commit
872abd7f73
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user