Let's say there's active development in both my main branch (devlop) and my feature branch. Both are adding migrations now and again. Before merging the feature branch into the main branch, I'm going to rebase it onto the main branch.
So it only makes sense for all the feature branch migrations to come after the most recent develop branch migration.
Is there a handy/advised way to do the renaming of these files? I can just generate dummy migrations and reuse the timestamps generated for them -- but I wonder if there's a best/common practice out there that I don't know about?
I haven't found a rails feature to do this for you, but it would be nice to have a migration touch
command or something. At any rate, what we do these days is just generate a new migration, copy the timestamp and rename the old one. Generally migrations are stand alone enough that the order doesn't matter, but occasionally we run into order dependencies so we need to update the timestamps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With