If you have 2 migrations within a plugin, they end up with different file names but the same version number. So rake db:migrate fails with "Multiple migrations have the version number 20080422212223".
In railties/lib/rails_generator/commands.rb migration_template checks for file name collisions - but only for the name portion of the full file name. Something needs to check for version (timestamp) collisions but I am not sure whether to do that by adding a version_exists? method and calling that from migration_template - or should I augment next_migration_string to check for collisions before returning the timestamp as version number?
This was probably broken in commit c00de99f69358b58ca2bd6bc732e2de1b667800e and is definitely broken as of svn revision 9248.