"change_column" migration method is missing from bundle!

9 views
Skip to first unread message

JosephKnight

unread,
May 19, 2008, 4:27:34 AM5/19/08
to Ruby on Rails: TextMate
Would it be so hard to program a migration snippet to behave similarly
to "Remove/Add Column"?

This "Change Column" snippet should:

1.) Type-out the "self.up change_column" line with default entries to
tab through
2.) look to the schema or previous migration so that it can...
3.) automatically place the reverse of itself into self.down

Remove/Add Column already uses much of this functionality. How does it
work tho?

Winner gets a free beer and RoR conversation if living in the Atlanta
area :)

Nic Williams

unread,
May 22, 2008, 4:48:31 AM5/22/08
to rubyonrail...@googlegroups.com
I think a lot of the column migrations are done as macros; others are done via a ruby script that returns snippets. I haven't looked at this code much.

No free beer for me :(

Nic
--
Dr Nic Williams
* Learn TextMate for Rails2 - http://peepcode.com/products/textmate-for-rails-2 *
Training in Ruby/Rails/JavaScript - http://drnicacademy.com
Fun with Ruby/Rails/Javascript - http://drnicwilliams.com
Reply all
Reply to author
Forward
0 new messages