Schema configuration works partially in jsreport-postgres-store extension
-
Hi everyone,
I'm using jsreport with the jsreport-postgres-store extension to store my templates in a PostgreSQL database. My goal is to keep all jsreport-related tables within a separate schema (named
pdf_template
) rather than the defaultpublic
schema.Here is the relevant part of my
jsreport.config.json
:{ "httpPort": 5500, "store": { "provider": "postgres" }, "blobStorage": { "provider": "postgres" }, "reportTimeout": 600000, "workers": { "numberOfWorkers": 2 }, "extensions": { "postgres-store": { "host": "localhost", "port": 5432, "database": "report", "user": "postgres", "password": "postgres", "schema": "pdf_template", "prefix": "jsreport_", "schemaCreation": true, "ssl": false } } }
I noticed that while most tables are created in the
pdf_template
schema as expected, the table for blob storage (jsreport_blob
) ends up in the public schema.I looked into the jsreport source code and saw that it uses
pg-promise
for PostgreSQL connections, and it appears that the schema parameter is passed on correctly for most of the queries. However, it seems like the blob storage table isn’t respecting the schema setting.I'm using
jsreport
andjsreport-postgres-store
latest versions.Are there any workarounds or fixes for it? Any insights or suggestions would be greatly appreciated!
Thanks in advance for your help.
-
Thank you for the bug report. I've now pushed the fix to the master. We should ship it during the next few weeks along with other improvements like automatic index creations.