page:guides:axum:schema changes

Apply database schema changes for Axum

Summary

Schema changes for a Axum app on Ample. Verified on Axum: a --release-command migration ran before activation and its marker was readable by the live app (migrated=release-ok). Build and start: cargo build --release in the rust builder image (stable toolchain, Cargo.lock committed, pure-Rust dependencies), then the release binary on the ubuntu-24.04 template reading PORT and DATABASE_URL.

Representative Queries

Resource Requirements

Infrastructure Requirements

Workload

Apply database schema changes

Release Status

Published

Support Status

Verified

Execution Status

Ready

Prerequisites

Test Configuration

Template

ubuntu-24.04

Runtime

rust

Size

s-1vcpu-2gb

Build

cargo build --release

Start

./$(ls target/release/*.d | grep -v '/lib' | head -n 1 | sed 's/\.d$//')

Workflow Steps

  1. Build and start: cargo build --release in the rust builder image (stable toolchain, Cargo.lock committed, pure-Rust dependencies), then the release binary on the ubuntu-24.04 template reading PORT and DATABASE_URL; 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

Examples

Success Checks

Limitations

Cost Estimate

Evidence Summary

Unknowns

Formats

Next Actions

  1. Browse the catalog index: GET /v1/catalog
  2. Search published recipes by intent, stack and constraints: POST /v1/catalog/search with body { "limit": 5, "query": "Apply database schema changes for Axum" }
  3. Prepare a side-effect-free deployment plan for an authorized project: POST /v1/catalog/plan with body { "inputs": {}, "projectId": "", "recipeId": "page:guides:axum:schema-changes", "recipeRevision": "r1" }
  4. Read the existing agent authentication setup: GET /mcp/setup
  5. Browse Axum: GET /v1/catalog/nodes/stack%3Aframework-axum
  6. Browse Configure deployment: GET /v1/catalog/nodes/intent%3Aconfigure-deployment
  7. Browse Transactional workflows: GET /v1/catalog/nodes/pattern%3Atransactional-workflows