I want to add a DB migration (I'm using PHP Ruckusing) to the main branch of my Mercurial repo and I have another migration created 开发者_如何学Goin a side branch (not part of the main one). Will there be any problems since the two migrations have the same number (411_AddSomething.php, 411_AddSomethingElse.php)?
I have hooks that run the migrations automatically on the production server and currently the side branch's migrations are ignored. I'm worried that when I will eventually merge the branches there will be problems with the numbers.
Thank you!
As long as the full file names are different, Mercurial won't mind.
As for Ruckusing, it appears to consider migrations in lexical order by filename, which may lead to surprising results if you're expecting 411_AddSomething.php
to run before 411_AddSomethingElse.php
. Newer versions of Ruckusing use a full timestamp instead of a serial integer for the filename, making this kind of collision much less likely.
Even so, it's still possible for two developers to write separate migrations that interfere with each other, even though your source control system reports a clean merge.
精彩评论