Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 955 Bytes

README.md

File metadata and controls

49 lines (32 loc) · 955 Bytes

How to use pgxgen tool

This repository explain how to use pgxgen tool

Local development

Install tools

make install-tools

Enviroments

Create .env file with your enviroments in root repository based on .env.example file

Create database

createdb pgxgenexample

Make migrations

make migrate up

Start microservice

make start

Create new migration

// replace MIGRATION_NAME.
// Example: make db-craete-miration book_rating
make db-craete-miration MIGRATION_NAME

Generate crud sql and store

  • Apply new migrations
  • Edit pgxgen.yaml in root repository. Documentation available here
  • Execute command make gensql

To override types use this documentation