cfg: change psql schema
This commit is contained in:
1 parent
1787a69143
commit
872abd7f73
1 file changed
+6
-1
+6
-1
@@ -2,4 +2,9 @@
|
||||
import postgres from "postgres";
|
||||
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;
|
||||
Reference in new issue
Block a user