Revision: Fri, 17 May 2024 13:03:36 GMT
v2.14 – outdated
This version of the documentation is outdated. Consider upgrading your project to Spiral Framework 3.12
Edit this page

Cycle ORM - Console Commands

Cycle ORM integration provides multiple commands for easier control. You can get help for any of the commands using

php app.php help cycle...

Make sure to enable Spiral\Cycle\Bootloader\CommandBootloader after the cycle bootloaders to active helper commands.


Command Description
migrate Perform one or all outstanding migrations.
--one Execute only one (first) migration.
migrate:replay Replay (down, up) one or multiple migrations.
--all Replay all migrations.
migrate:rollback Rollback one (default) or multiple migrations.
--all Rollback all executed migrations.
migrate:init Init migrations component (create migrations table).
migrate:status Get list of all available migrations and their statuses.


Command Description
db:list [db] Get list of available databases, their tables and records count.
db database name.
db:table <table> Describe table schema of specific database.
table Table name (required).
--database Source database.

ORM and Schema

Command Description
cycle Update (init) cycle schema from database and annotated classes.
cycle:migrate Generate ORM schema migrations.
--run Automatically run generated migration.
cycle:render Render available CycleORM schemas.
--no-color Display output without colors.

You can run any cycle command with -vv flag to see a list of modified tables.