Upgrade to a new version
You move the instance to a newer version without breaking open browsers or the database, and you know how to go back or unblock an interrupted migration. Before you start, make a backup: the schema only moves forward, and going back to the previous image is not enough to go back.
Know that a newer version exists
On a build placed on a tag, the administration toolbar shows, next to the bell, an icon whose tooltip names the latest published release when it is newer than the one running; clicking opens its release notes. It is the browser of a signed-in administrator (session confirmed on /api/auth/me before any outgoing call) that queries GitHub’s public API (/releases/latest, once per page load), never the server, which may be deployed with no outgoing network. A build on a SHA queries nothing. GitHub unreachable, quota exhausted or unexpected answer: the icon stays absent, with no message. If you name endpoints in CSP (the browser headers), leave https://api.github.com there to keep it, or omit it to disable it. What each number promises is in version numbers.
1. Choose the version to deploy
A production deployment references a named version (1.2.0), never :main or :latest, through the APP_VERSION variable of .env.prod. The version is also read in GET /api/config (version field: X.Y.Z on a release image, the short SHA on an acceptance image, 999-SNAPSHOT locally). Read the release notes before upgrading: the “⚠️ Attention” entry flags what needs action from you, such as a new legal constraint that may make a schedule that used to pass unsatisfiable, or a value to convert by hand.
2. Deploy
-
Set
APP_VERSIONto the new version in.env.prod. -
Pull the image and recreate the stack:
docker compose -f docker-compose.prod.yml --env-file .env.prod up -d -
Check:
scripts/verifier-deploiement.sh https://<domain>compares the exposed version withAPP_VERSION, together with availability and the legal notices (the script).
Every successful start of a version other than the previous one is recorded in the database (version_applicative: version, first start, last migration at that time; under ALLOW_SCHEMA_AHEAD, the last migration that version knows, so it does not pass for the one that migrated the database).
3. Redeploy without breaking open browsers
Nothing to clear or to ask users: after an upgrade, the application reloads its files by itself, on the next visit or at the first click of a tab left open. The mechanism, useful only to diagnose a blank screen, is in The Angular frontend.
4. Upgrades that need an action
V126and the time zone: the migration converts five zone-less timestamps totimestamptz, reading them in the instance’s zone at migration time. It must be the one the rows were written under (the JVM’s zone,TZ): under another, these dates shift. The repeated hour of the change to winter time is ambiguous in every case. The migration refuses to start, naming the table, if rows point at a timeslot of another edition: this is a data incident to examine, never repaired automatically.- The weight scale:
V108multiplies by five the weights of each edition, the importance of a rule reading weak 1, normal 5, strong 25 (decision 0057 (external site)). It only rewrites the database: what carries a weight elsewhere keeps the old scale, and the rule would weigh five times less than the others. Aplanning.constraint-weights.<rule>override is multiplied by five, or removed if it repeated the old default1; an SQL export of the application taken before the upgrade is corrected (ponderation_contrainteweights × 5) before being imported, or the importances are set again on the Planning rules screen; a scenario file written before has itscontraintes.poids× 5 (format). Apg_dumprestored byscripts/restaurer.shis not concerned: the application replaysV108at startup. - The legal notices and the active edition: a public instance (
PUBLIC_INSTANCE=true) in service that never filled in its legal notices does not restart, and any other warns (fill them in). WithV118, the active edition is chosen automatically (automatic sends). - 4.0.1 and the origin of requests: a browser request whose
Originheader is not the application’s address is refused with 403. Your reverse proxy must pass the visitor’sHostheader andX-Forwarded-Proto, otherwise screens display but every save fails with 403. Fix the proxy (a single origin), or setQUARKUS_HTTP_CORS_ENABLED=falsewhile you do.
The PostgreSQL version
The postgres: image of docker-compose.prod.yml and the pg_dump client of the application image are at version 19 and always move together: a pg_dump older than the server refuses to run (“server version mismatch”) and the nightly backup would fail without the application stopping. At startup, Flyway writes “Using PostgreSQL 19.0 which is newer than the version Flyway has been verified with (18)”: an expected warning with no effect.
Unblock an interrupted migration
A startup cut in the middle of a migration leaves a failed row in Flyway’s history, and every following migration refuses to start. FLYWAY_REPAIR_AT_START=true removes that row at the next start. Set it back to false once the instance is up: at true, the repair also realigns the history’s checksums on the shipped files, and a migration modified afterwards would pass without a word. It does not touch successful migrations the image does not know: a database ahead of the binary is not an interrupted migration, and on such a database the repair is even refused (message of the next section), because it would erase the interrupted migration of a newer version.
A database ahead of the image
An older image refuses to start on a newer database. At startup, the application compares the database’s Flyway history with its embedded migrations; if the database carries one the binary does not know, it stops with a message naming its version, the last migration it knows, the last one applied and the version that applied it (docker compose -f docker-compose.prod.yml --env-file .env.prod logs app). Two ways out, and neither is to touch the schema by hand:
| Way out | When |
|---|---|
Redeploy the version that migrated the database (APP_VERSION) |
the ordinary case: the rollback was a mistake, or the expected fix exists in an at least as recent version |
Restore a backup from before the upgrade, with scripts/restaurer.sh (the procedure) |
you really need the old version, at the cost of the writes made since the upgrade. The script warns when the dump is newer than the image |
ALLOW_SCHEMA_AHEAD=true forces the start, with a WARN in the log and to Sentry, for whoever knows the migration ahead is additive and the old code supports it; the readiness probe then no longer counts the failed migrations of the newer version, otherwise the instance would never be ready. Set it back to false afterwards: at true, it would silently let the next rollback through, the one nobody checked. The check rests on migrations, never on the version number: a local 999-SNAPSHOT build on a copy of the production database follows the same rule. The Debug page lists the versions that opened the database, with the last migration applied at their first start.

A mistake, an omission? Fix this page on GitHub. (external site)