O'Reilly logo

CakePHP 2 Application Cookbook by Jorge González, James Watts

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Migrations plugin

The CakePHP schema shell provides basic database change management, but when your project complexity grows and you need more control over database changes, the CakeDC Migrations plugin is the way to go. Distributed under the MIT License, it's open source and totally free to use in your commercial projects.

Getting ready

We'll assume that you have a profiles table created in the database and the Profile model file in app/Model/Profile.php from our previous recipes.

First, install the CakeDC Migrations plugin either as a git submodule or by downloading the ZIP file and dropping the file contents under the app/Plugin/Migrations folder. Refer to the Including a plugin recipe from Chapter 1, Lightning Introduction, for more details. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required