I'm not sure if you are modifying a legacy Rails app or a legacy DB schema.
If it is the latter, I suggest looking at Datamapper instead (http:// datamapper.org) since that will let you explicitly map fields from the database to properties. As for the former, I suggest playing it safe: take a mysqldump of the existing database (I'm assuming it is in production) and load it to your dev box; have your dev box version of the app connect to your copy of the database. You can experiment and play with it without fear of wiping out the data -- since you have a snapshot, you can always reload it from scratch. Ho-Sheng Hsiao http://ruby-lambda.blogspot.com/ On Aug 20, 3:24 pm, tuti plain <[email protected]> wrote: > Hi everyone, > > I am attempting to connect an already existing mysql database with > Rails. For This I can't use the traditional "generate scaffold" and > "rake db:migrate" because (I think), I'll loose the data already > existing in that database table. So what I did was, I generated a > scaffold for my table, and instead of running db:migrate, I added a > set_table_name to my model. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

