Skip to main content
Version: v1.0

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

OptionDescription
-h, --helpDisplay help for the given command. When no command is given, help for the main list command is displayed.
--silentCompletely suppress output (do not print any messages).
-q, --quietOnly errors are displayed. All other operational output is suppressed.
-V, --versionDisplay this application version.
--ansi, --no-ansiForce or explicitly disable ANSI stylized terminal output color sequences.
-n, --no-interactionDo not ask any interactive confirmation questions (safe for automation scripts).
-v, --vv, --vvv, --verboseIncrease 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.

CommandAliasDescription
migrations:migratemigrateExecute a migration to a specified version or the latest available version.
migrations:executeexecuteExecute one or more migration versions up or down manually.
migrations:generategenerateGenerate a blank, scaffolded migration class file.
migrations:statusstatusView the operational status of your migration sequence.
migrations:listlist-migrationsDisplay a list of all available migrations alongside their current execution status.
migrations:latestlatestOutput the identifier of the latest available version.
migrations:dump-schemadump-schemaDump your database's current structural schema into a fresh migration file.
migrations:rolluprollupClear out all tracked historic versions and collapse the current state into a single baseline version.
migrations:sync-metadata-storagesync-metadata-storageEnsure that the internal migration tracking metadata storage tables are up to date.
migrations:versionversionManually register or remove specific migration versions directly from the internal tracking table.