page:guides:quarkus:schema changes

Apply Database Schema Changes for Quarkus

Schema changes for a Quarkus app on Ample. Verified on Quarkus: a --release-command migration ran before activation and its marker was readable by the live app (migrated=release-ok). Build and start: ./mvnw -q -DskipTests package producing one uber-jar (quarkus.package.jar.type=uber-jar), then java -jar on the jvm-21 template (Temurin JDK 21) with quarkus.http.port read from PORT.

Representative Queries

Resource Requirements

Infrastructure Requirements

Prerequisites

Workflow Steps

  1. Build and start
    ./mvnw -q -DskipTests package producing one uber-jar (quarkus.package.jar.type=uber-jar), then java -jar on the jvm-21 template (Temurin JDK 21) with quarkus.http.port read from PORT; the server must bind 0.0.0.0 on PORT.

  2. Run migrations as the release command
    Ample runs the command before activation and fails the release if it exits non-zero; keep migrations idempotent.
    Command: ample deploy . --name --public --release-command "python3 migrate.py"

  3. Verify
    Fetch the live URL and /p/migrated on the example; on failure read the build and runtime logs.
    Command: ample logs --kind build

Tested Configuration

Limitations

Cost Estimate

Evidence Summary

Next Actions