akrabat/Akrabat — pull request #4 by dstockto (2011-10-14 06:07:22+00:00)
Title: Added features for Akrabat database migrations

These changes include a number of new features. I can split them out into individual features if desired.

1) Allow increment of versions. You can imcrement one or more versions. ie,

zf increment database-schema

(increases to the next version number unless already at the maximum)
or

zf increment database-schema 2

(goes up 2 versions)

2) Allow decrement of versions. Like increment, you can decrement 1 or more versions.

zf decrement database-schema 4
(goes down 4 versions)

3) Downgrades update the version to the number that really exists. For instance if there are versions 1, 5, 10 and 15 and you are on 15, previously update-to 14 would put 14 in the database and remove version 15. This will indicate on the screen and in the database that the version is actually 10.

4) Checks if scripts directory is a directory and is readable before trying to find migration files. Previously this would bomb out with several warnings and issues showing in the console.

Thanks for creating this tool. I hope these changes are useful for you.

Thanks,
David