Skip to content
stvvt edited this page Sep 9, 2011 · 1 revision
  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
    
Clone this wiki locally