public
Description: Database migrations shell for CakePHP. NO LONGER MAINTAINED HERE. MOVED TO http://codaset.com/joelmoss/cakephp-db-migrations
Home | Edit | New

Installation

1. Simply place the following three files into the ‘vendors’ directory in your Cake root or your Cake app root:

  • migrate.php
  • fixtures.php
  • fixture_helpers.php

2. You will need to ensure that Pear is installed on the machine that you are developing on, and that you have installed the MDB2 Pear package.

3. If you haven’t already done so, or have not used any of the Cake console shells, you will need to setup the Cake console on your machine. Please watch the realtive screencast for your OS at http://www.cakephp.org/screencasts

4. Now just open up your console or terminal program and cd into your Cake app root.

5. Now enter the following in your console: (don’t type the $ sign)

cake

This will list all the shells that are installed and ready to run. If you installed everything correctly, then ‘migrate’ and ‘fixtures’ will be listed.

6. Type in this:

cake migrate help

This will display the help and usage instructions.

7. To generate your first migration file, run this:

cake migrate generate my_first_migration

Then edit the file it generates, after which you can migrate:

cake migrate
Last edited by joelmoss, Sun Nov 02 13:24:52 -0800 2008
Home | Edit | New
Versions: