Wednesday, January 6, 2010

[Rails] Updating table data

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.

Q1: Can this be done outside the application? i.e. write a script that
can interact with the db and then populate the appropriate column? And
is this advisable?

or

Q2: if the aforementioned idea is not a good way then what will be the
best way to update the existing records as any code i will write will
only be used to update the table once.

One suggestion that has been made is to use migrations but I am not 100%
on how i can do that...

Plz help
--
Posted via http://www.ruby-forum.com/.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate