Script to reorder your migrations


This is a little script to rename your migrations should you ever need to delete one in the middle of your bunch.


$ ls 001_foo.rb 002_bar.rb 003_baz.rb $ rm 002_bar.rb $ ruby migration-reorder.rb . Done; 1 of 2 migrations renamed. $ ls 001_foo.rb 002_baz.rb

Just drop it into your db/migrate folder before running it.

Enjoy Ian