page:guides:laravel:schema changes
Apply Database Schema Changes for Laravel
Summary
Schema changes for a Laravel app on Ample. Verified on Laravel: a --release-command migration ran before activation and its marker was readable by the live app (migrated=release-ok). Build and start: composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template.
Representative Queries
- Apply database schema changes for Laravel
- Where can I host Apply database schema changes built with Laravel?
- I need a framework-specific schema migration and rollback procedure; no managed migration service is assumed.
Resource Requirements
- primitive:compute
- primitive:postgres
Infrastructure Requirements
- Compute
Status: verified
Summary: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes. - Postgres
Status: verified
Summary: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.
Prerequisites
- A Laravel project (composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template)
- A PostgreSQL driver reading DATABASE_URL at runtime
- An Ample account token with servers:write, databases:read
Workflow Steps
- Build and start
composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template; the server must bind 0.0.0.0 on PORT. - Run migrations as the release command
Ample runs the command before activation and fails the release if it exits non-zero; keep migrations idempotent.ample deploy . --name --public --release-command "python3 migrate.py" - Verify
Fetch the live URL and /p/migrated on the example; on failure read the build and runtime logs.ample logs --kind build
Examples
- Laravel pattern fixture: Verified schema changes on Laravel.
Success Checks
- app responds on its public URL
- Kind: http_get
- Path: /
- Expect: ample canary laravel patterns
- migrated check from the example
- Kind: http_get
- Path: /p/migrated
- Expect: see the pattern fixture checks
Limitations
- Verified on the php-8.5 template at s-1vcpu-1gb; other sizes and Laravel major versions are not verified.
- Region, compliance attestations and request-duration limits are unknown and not claimed.
- Managed PostgreSQL 16 only; extensions, connection limits and backup or restore procedures are not verified.
Cost Estimate
- Currency: USD
- Monthly Amount: 10.0
- Authoritative: true
- Basis: size prices from pricing.toml (loaded by the API) at build revision 1ac5595375130d45290090e82ed0f554ccd45405-dirty
- Components:
- App server: s-1vcpu-1gb (1.0) - $5.0
- Managed PostgreSQL database: s-1vcpu-1gb (1.0) - $5.0
- Note: Always-on monthly price of the tested sizes; apps auto-pause when idle. Buckets are allocation-priced per quota and not included.
Evidence Summary
- Kind: canary_run
Summary: Laravel pattern fixture deployed on Ample (composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template); for this guide: a --release-command migration ran before activation and its marker was readable by the live app (migrated=release-ok).
Observed At: 2026-09-20T20:36:21Z
Expires At: 2027-03-19T20:36:21Z
Scope: {"checks":["/p/migrated"],"template":"php-8.5"}
Last Verified At
2026-09-20T20:36:21Z
Unknowns
- region availability is unknown until a verified region fact is recorded
- compliance attestations are unknown; none are claimed.