akrabat/Akrabat — pull request #7 by dstockto (2011-10-31 20:26:12+00:00)
Title: Fix for finding real version on downgrade migrations.

Fix for finding real version on downgrade migrations. Bug happened if migrating to lowest version number and version > 0.

If _getMigration files only returns a single file, the array_shift would pull it off and then the following check for if $files contains stuff would fail and it would say the version is 0.

This fixes that so that you can downgrade to the lowest version (that exists) even if that version is > 0.