Skip to content
/ Lib Public

Database definitions, migrations, configuration. Shared across Bantr repos

Notifications You must be signed in to change notification settings

Bantr/Lib

Repository files navigation

This package is used in Bantr projects, to share types, util functions, ...

Setting up database

  • Set up .env file (see .env.example)
  • npm run db:migrate
  • npm run hasura:metadata:apply

Making changes to DB schema

  • Change entities
  • npm run db:migrate:gen -- -n some-descriptive-name
  • Check migration file for correctness, adjust as needed
  • npm run db:migrate
  • Go into Hasura, reload metadata
  • Make changes to Hasura (Add data fields, fix relations, set permissions, ...)
  • npm run hasura:metadata:export

Releasing a new version

Use the npm version command on the master branch.

# MAJOR version when you make incompatible API changes,
npm version major

# MINOR version when you add functionality in a backwards compatible manner, and
npm version minor

# PATCH version when you make backwards compatible bug fixes.
npm version patch