As of 16/03/2026 this repository only contains the new Gatehouse DB and its associated schema. This repository previously contained a Scala app that was due to replace Identity API, however plans to replace Identity API have been put on hold whilst we upgrade its database.
The last commit which included the Gatehouse scala app can be found here
This repo contains the schema files for the Gatehouse database, these can be found in the ./db folder.
The following steps require docker, aws, and jq installed.
- Create a new file in
./db/migrationswith the naming schemeV(YYYYMMDD)__Migration_Description.sql. The naming scheme is important and the migration will be skipped if it does not adhere to it, take note of the double underscore between the version number and migration description. - Run
./db/test.shto test and verify your new migration against the local test database. - Create a PR and merge your new migration into
main - Run
./db/migrate.sh CODEto apply the migrations to CODE.- You will be prompted to rotate the admin user credentials, we suggest you always do this but you may want to delay the rotation if you are worried about your migration causing any outages.
- Run
./db/migrate.sh PRODto apply the migrations to PROD.