graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.Server.Migrate

Description

Migrations for the Hasura catalog.

To add a new migration:

  1. Bump the catalog version number in src-rsr/catalog_version.txt.
  2. Add a migration script in the src-rsrmigrations directory with the name version_to_version.sql.
  3. Create a downgrade script in the src-rsrmigrations directory with the name version_to_version.sql.
  4. If making a new release, add the mapping from application version to catalog schema version in src-rsr/catalog_versions.txt.
  5. If appropriate, add the change to serversrc-rsrinitialise.sql for fresh installations of hasura.

The Template Haskell code in this module will automatically compile the new migration script into the graphql-engine executable.

NOTE: Please have a look at the `serverdocumentationmigration-guidelines.md` before adding any new migration if you haven't already looked at it

Documentation