Cycle ORM integration provides multiple commands for easier control. You can get help for any of command using
$ php app.php help cycle...
Make sure to enable
Spiral\Bootloader\CommandBootloaderafter the cycle bootloaders to active helper commands.
To update the ORM schema without modifying the database run:
$ php app.php cycle
To update the schema and automatically modify database schema:
$ php app.php cycle:sync
Attention, do not use this command in combination with migrations.
To generate a migration file to reflect the current ORM schema:
$ php app.php cycle:migrate
Make sure to run
You can also run generated migration automatically:
$ php app.php cycle:migrate -r
You can run any cycle command with
-vvflag to see list of modified tables.