Yes, this is the problem with transitioning to migrations, especially with the 3.1 transition on top of it.

If we can get around the problem mentioned in this post just in 3.1 we could perhaps not have to do anything for 3.0.
http://area51.phpbb.com/phpBB/viewtopic.php?f=108&t=41337&p=250159#p250159

I already have the database updater in the migrations data PR handling creating the migrations table and populating it based on the phpBB version number.

There are two other ways I can think of to prevent the problem, either make a method in the migration data file that tests to see if the migration was effectively installed (which may be prone to errors if the db has been modified), or make sure we have the migration data files for every version of 3.0 in the 3.1 release (meaning if we want to release 3.0.13 after 3.1.0 we would need to release 3.1.1 with the migration data files from 3.0.13 before releasing 3.0.13).