
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
pg-generator
Advanced tools
pg-generator takes your burden of manually creating ORM files or any other files which are based on database structure.
$ npm install -g pg-generator
See sequelize template for usage and details.
$ pgen template sequelize -t sequelize-template
$ pgen exec sequelize-template -d our_crm -u user -p tOpSeCrEt -t model --fix
First command copies one of the builtin templates (sequelize) into target directory (sequelize-template). Second command generates files based on given template (sequelize-template) into target directory (model).
You may change generated templates according to your requirements, also you should add generated templates to your repository.
pgen template to copy one of the builtin templates or create your own template. (You can use base template for starting up.)pgen exec to create files based on your template.You can access CLI options and their description via -h or --help arguments.
$ pgen --help
$ pgen template --help
$ pgen exec --help
Creating a template from scratch is easy. Execute command below:
$ pgen template base -t my-template
To see a basic example execute following command from shell and examine files in tutorial-example directory.
$ pgen template tutorial -t tutorial-template
For a full fledged example which we use at Ozcorp, see Sequelize Example above.
If you prefer lower level methods to directly access PostgreSQL structure to build your own generators. You can check pg-structure module which is used to build this module and provides direct access to database structure.
Documentation is available on pg-generator.com
Documentation is auto generated thanks to:
Without necessary information, it is hard to impossible to debug every error for every database.
Please include details below in your bug reports.
pg-generator and PostgreSQL version,pgen commands you executed,Send bug reports and feature requests to GitHub Issues.
FAQs
Template Based Scaffolding Tool for PostgreSQL.
We found that pg-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.