On Wed, Jan 6, 2010 at 11:35 AM, Aldric Giacomoni <li...@ruby-forum.com> wrote: > Quee WM wrote: >> I have an application in rails in which i am adding a new column in one >> of the tables. The value for the new column is a bit.ly link and I need >> to populate this for each record in the table approx. 250 rows will be >> affected. >> >> One suggestion that has been made is to use migrations but I am not 100% >> on how i can do that... >> > > A migration is a Ruby script. > The Rails sugar helps you tell the application (for instance): > "Hey there! I need you to add a column to this table. And while you're > at it, check every row, and do this on every row, so we can populate > that new column." > If the value of the column is the same for every row, can't you just use default value when you create the column?
-- Curtis Cooley curtis.coo...@gmail.com home:http://curtiscooley.com blog:http://ponderingobjectorienteddesign.blogspot.com =============== Leadership is a potent combination of strategy and character. But if you must be without one, be without the strategy. -- H. Norman Schwarzkopf
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.