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:
  1.   create_table:
  2.     users:
  3.       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:
  1.   create_table:
  2.     users:
  3.       id: false
  4.       name: text
  5.       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:
  1.   create_table:
  2.     users:
  3.       id: false
  4.       name: text
  5.       age: int
  6.       mysql_charset: UTF8
  7.       mysql_engine: innodb
  8.       mysql_collate: utf8_general_ci
  9.       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!