Kyle Maxwell tipped me off to the lunchbox blog where Scott Barron wrote about an “auto-fill reverse migration” command for TextMate.

Unfortunately, Scott lost his work in a hard drive crash a while back, so I wasn’t able to use his work. But I did steal his idea! In the latest syncPEOPLE on Rails bundle (now in the TextMate Bundle repository) you can use the “Migration Drop and Create Table” macro/snippet combination.

Basically, what happens is since it knows you’re trying to drop a table, it uses your schema.rb file to figure out how to re-create the table for your migration’s self.down method. All in one context-sensitive snippet triggered by “mdct[tab]“.