CakePHP Migrations v4.0 Release Candidate
Article posted by Joel Moss on 25 May 2008   |  
OK boys and girls; I just posted the first and hopefully only release candidate of Migrations v4.0. Get it while it's hot. This release includes a few bug fixes. In fact, it fixes most known bugs, and allowed me to close a lot of the bug tickets. There are only three or four left, which I hope to eradicate by the time the stable release comes around. Here's the changes since the beta... UUID Switch Migrations have supported Cake's UUID columns as of v3.7, but in that release you could only use them if you had enabled the appropriate variable within the script itself. This obviously meant that you couldn't enable UUID's on a per migration basis. No more I tell you, no more! If you want your ID column to use UUID's, just use this in your migration:
up:
  create_table:
    users:
      id: uuid
And now when you run that migration,the id column will be created with the correct type and length for using UUID's. No ID Syntax Change Following on from the above, and to make things just a little easier; using the following will create a table with no ID column:
up:
  create_table:
    users:
      id: false
      name: text
      age: int
This replaces the no_id syntax. MySQL Specific Commands And because we all use MySQL right? You can now use some extra commands when creating tables:
up:
  create_table:
    users:
      id: false
      name: text
      age: int
      mysql_charset: UTF8
      mysql_engine: innodb
      mysql_collate: utf8_general_ci
      mysql_comments: Oooh, this is really fantastic!
Pretty much self-explanatory right? So as I said, I hope this will be the only release candidate, so please submit your bug reports, so I can push out a perfect stable release. Enjoy!

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!