forge db-migrate
Run database migrations for the latest deployment.
Command
forge db-migrate [--app <name>] [--wait]
Arguments
None.
Flags
| Flag | Type | Default | Notes |
|---|---|---|---|
| string | — | Project or app name filter |
| bool | | Stream SSE logs until migration completes |
Examples
Run migrations:
forge db-migrate
Migrate specific app:
forge db-migrate --app my-api
Wait for completion:
forge db-migrate --wait
Errors
| Exit code | Meaning |
|---|---|
| 0 | Migration completed successfully |
| 1 | Migration failed |
Pitfalls
- Linked project — targets the project linked via
in the current directory.forge link - SSE streaming —
uses Server-Sent Events to stream migration logs in real time.--wait
See also
{auto-injected}
Tested against
{auto-injected}