Articles tagged with "migrations"
Cake DB Migrations v3.2
This article may be a little outdated. For the latest version and more info, please go to http://developingwithstyle.com
Cake DB Migrations has now been updated to work with the very latest version of CakePHP 1.2 and the new (hopefully final) console/shells system. I have also added a few extra goodies to make life a little easier.
The new features and changes are as follows:
* You can now specify a column without the need to specify the column type. Type is set to string, which is simply a varchar(255) column.
* Ability to add user definable foreign keys by simply specifying the 'fkey' as a column name, followed by the name(s) of the foreign key(s).
* You can now include PHP code within the YAML migration files
Because the console system in Cake 1.2 has changed a bit, ou now have to place the below script in a slightly different place. Within your main 'vendors' directory above your app and cake core directories, paste the below code into a file called 'migrate.php' and place that file in a directory called 'shells'.
Now just bring up your favourite command line tool and cd into your cake applications root directory and run the following:
./cake migrate
And that is it! That will migrate to the lastest version. You can specify the version like this:
./cake migrate -v 3
As promised, I hope to create a screencast going through all aspects of migrations and how they can save your life.
[Read more] Cake DB Migrations has now been updated to work with the very latest version of CakePHP 1.2 and the new (hopefully final) console/shells system. I have also added a few extra goodies to make life a little easier.
The new features and changes are as follows:
* You can now specify a column without the need to specify the column type. Type is set to string, which is simply a varchar(255) column.
* Ability to add user definable foreign keys by simply specifying the 'fkey' as a column name, followed by the name(s) of the foreign key(s).
* You can now include PHP code within the YAML migration files
Because the console system in Cake 1.2 has changed a bit, ou now have to place the below script in a slightly different place. Within your main 'vendors' directory above your app and cake core directories, paste the below code into a file called 'migrate.php' and place that file in a directory called 'shells'.
Now just bring up your favourite command line tool and cd into your cake applications root directory and run the following:
./cake migrate
And that is it! That will migrate to the lastest version. You can specify the version like this:
./cake migrate -v 3
As promised, I hope to create a screencast going through all aspects of migrations and how they can save your life.
YAMMY!: DB to YAML table converter for migrations
YAMMY! is the "missing puzzle piece" to the great migrations Shell coded by Joel Moss. YAMMY! provides a fast and convinient way to convert your DB table structure into the right YAML format needed by the migration shell. YAMMY! helps you to deploy faster!
[Read more]
Latest Comments