Framy Migration
Database migrations allow you to safely evolve your database schema over time.
tip
If you run your Migrations through the Framy Wizard interface, you can completely skip this manual step.
Core Operations
These are the most common commands used during standard development and deployment workflows.
Migrate to Latest Version
To apply all pending migrations and bring your database schema up to the latest version, execute the following command:
docker compose exec framy php SK migrate
Rollback a Migration
If you need to revert the changes introduced by the last successfully executed migration, run the following rollback command:
docker compose exec framy php SK migrations:execute --down
Global CLI Usage
All migration tasks follow a standardized CLI command structure and share global flags.
Syntax
command [options] [arguments]
Global Options
| Option | Description |
|---|---|
-h, --help | Display help for the given command. When no command is given, help for the main list command is displayed. |
--silent | Completely suppress output (do not print any messages). |
-q, --quiet | Only errors are displayed. All other operational output is suppressed. |
-V, --version | Display this application version. |
--ansi, --no-ansi | Force or explicitly disable ANSI stylized terminal output color sequences. |
-n, --no-interaction | Do not ask any interactive confirmation questions (safe for automation scripts). |
-v, --vv, --vvv, --verbose | Increase log output verbosity: 1 for normal output, 2 for more detailed verbose logs, and 3 for deep troubleshooting debug info. |
Command Reference
The migrations namespace provides a rich set of utility commands for managing your database lifecycle.
| Command | Alias | Description |
|---|---|---|
migrations:migrate | migrate | Execute a migration to a specified version or the latest available version. |
migrations:execute | execute | Execute one or more migration versions up or down manually. |
migrations:generate | generate | Generate a blank, scaffolded migration class file. |
migrations:status | status | View the operational status of your migration sequence. |
migrations:list | list-migrations | Display a list of all available migrations alongside their current execution status. |
migrations:latest | latest | Output the identifier of the latest available version. |
migrations:dump-schema | dump-schema | Dump your database's current structural schema into a fresh migration file. |
migrations:rollup | rollup | Clear out all tracked historic versions and collapse the current state into a single baseline version. |
migrations:sync-metadata-storage | sync-metadata-storage | Ensure that the internal migration tracking metadata storage tables are up to date. |
migrations:version | version | Manually register or remove specific migration versions directly from the internal tracking table. |