Migrations v2.2
Article posted by Joel Moss on 29 Nov 2006   |  
Another day, another Migrations release. Version 2.2 is now available for download. This release fixes a few more bugs aswell as the following two minor - but nice - changes:

'created' & 'modified' fields now optional

Creation of created and modified fields can now be prevented. Example:
UP:
  create_table:
    users:
      first_name:
        type: text
        length: 64
        notnull: true
        index: true
      last_name:
        type: text
        length: 64
      created: false
      modified: false
Note the last two lines. Leave these lines out completely and 'created' and 'modified' fields will be created for you.

Instant operation

Thanks to a comment from Daniel Hofstetter, you can now run migrations and fixtures with one command and bypassing all prompts. This makes the whole process very fast and save a bundle of time. Just do the following to run your latest migrations:
php vendors/migrations/migrate.php -migrate latest
or specify the migration version:
php vendors/migrations/migrate.php -migrate 4
You can also run any specified fixture in the same way:
php vendors/migrations/migrate.php -fixture users
BE WARNED that running the above commands will not prompt you at all, or ask you to confirm the action. So if you mistype a version number of fixture name, and delete all your work, I will not be held responsible. As usual, play nicely and post away if you have anything to say or request.

This site contains the musings of Joel Moss, and is powered by Codaset pages; a simple, yet powerful way to host your static site. Just commit and push your site to your free Git repository at Codaset, and that's it!