https://github.com/jsreport/jsreport-postgres-store
postgres store for jsreport
https://github.com/jsreport/jsreport-postgres-store
jsreport postgresql
Last synced: about 1 year ago
JSON representation
postgres store for jsreport
- Host: GitHub
- URL: https://github.com/jsreport/jsreport-postgres-store
- Owner: jsreport
- Created: 2016-01-23T14:16:28.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-08-20T16:37:46.000Z (almost 5 years ago)
- Last Synced: 2024-04-25T04:44:26.760Z (about 2 years ago)
- Topics: jsreport, postgresql
- Language: JavaScript
- Homepage: https://jsreport.net
- Size: 211 KB
- Stars: 6
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**⚠️ This repository has been moved to the monorepo [jsreport/jsreport](https://github.com/jsreport/jsreport)**
--
# jsreport-postgres-store
[](https://npmjs.com/package/jsreport-postgres-store)
[](https://travis-ci.org/jsreport/jsreport-postgres-store)
**[jsreport](https://github.com/jsreport/jsreport) template store extension allowing to persist data in [PostgreSQL](http://www.postgresql.org/) database**
## Installation
> npm install jsreport-postgres-store
Then alter jsreport configuration
```js
{
"store": {
"provider": "postgres"
},
"extensions": {
"postgres-store": {
"host": "localhost",
"port": 5433,
"database": "jsreport",
"user": "postgres",
"password": "password"
}
}
}
```
After jsreport initializes you should see tables like `jsreport.TemplateType` and other in `jsreport` database.
## Schema changes
If you do changes to the database schema by enabling additional extensions you need to drop the affected tables and let jsreport to reinitialize them.
## jsreport-core
You can apply this extension also manually to [jsreport-core](https://github.com/jsreport/jsreport-core)
```js
var jsreport = require('jsreport-core')()
jsreport.use(require('jsreport-postgres-store')({ host: '...'}))
```