Schema Management and Migration in CakePHP 3
I used
Console/cake schema
in CakePHP 2.
Now I am on my way to CakePHP 3 and find out I am Console/cake schema
gone.
So what's the recommended way to manage schemas and migrations now?
Lorenzo from CakePHP core created below plugin. It is currently in development and should be considered experimental.
CakePHP 3.0 Database Migration Plugin
https://github.com/cakephp/migrations
Migrations plugin is now part of CakePHP Core
There are currently 2 routes to create a migration:
Cake (using cookies)
bin/cake bake migration [migration_name]
Phinx
bin/cake migrations
Using the above code Phinx
, it will provide you with several options i.e. create, migrate, rollback
- Create requires the migration name to useCamelCase