psql search_path

This commit is contained in:
Flummi 2022-05-08 05:51:09 +02:00
parent 659adca258
commit e7ee063021

View File

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