The Cycle ORM integration provides multiple commands for easier control. You can get help for any of the commands using
php app.php help cycle...
Note
Make sure to enableSpiral\Cycle\Bootloader\CommandBootloader
after the cycle bootloaders to activate helper commands.
Command | Description |
---|---|
migrate |
Performs one or all the outstanding migrations.--one Execute only one (first) migration. |
migrate:replay |
Replays (down, up) one or multiple migrations.--all Replays all the migrations. |
migrate:rollback |
Rolls back (default) or multiple migrations.--all Rolls back all the executed migrations. |
migrate:init |
Initiates the migrations component (create a migrations table). |
migrate:status |
Gets a list of all available migrations and their statuses. |
Command | Description |
---|---|
db:list [db] |
Gets a list of available databases, their tables and records count.db database name. |
db:table <table> |
Describes a table schema of a specific database.table A table name (required).--database A source database. |
Command | Description |
---|---|
cycle |
Updates (init) the cycle schema from the database and annotated classes. |
cycle:migrate |
Generates the ORM schema migrations.--run Automatically runs a generated migration. |
cycle:render |
Renders the available CycleORM schemas.--no-color Displays output without colors. |
Note
You can run any cycle command with the-vv
flag to see a list of modified tables.