Upgrades

Install a new version of Scalengi safely — read the notes, back up, migrate, restart.

Before the upgrade

  1. Read the release notes of every version between yours and the new one. Some versions require an operator action, always written in bold in the notes.
  2. Take a backup of both databases and check that the copies are complete.
  3. Plan a short interruption: users are signed out during the restart.

Upgrade

  1. Unpack the new release archive and load its images.
  2. Stop the Core and the identity service.
  3. Apply the database migrations with the migrator role, before starting the new version:
docker compose run --rm -e MIGRATION_DATABASE_URL core scalengi-core-api migrate

The command takes a PostgreSQL lock, checks the whole migration history against the checksums shipped with the release, then applies the new migrations in order. It refuses a database whose history differs.

  1. Start the identity service, then the Core, and wait for their health checks.
  2. Sign in, open a diagram and an inventory, and check the version shown in the release notes.

Installations without checksums

An installation created before migration checksums existed has none recorded. After backing it up and checking its schema against the release, run the migration once with migrate --adopt-existing. This option records your verification; it does not prove by itself that the old schema is identical. Test it on a copy first.

Going back

Running an older image does not undo a schema change. To go back, restore the backup taken before the upgrade, then start the previous version.