agilehack wrote:
> that is a great idea and I had that thought.  It has several tables
> and some of the table many fields so is there an easy way to do that?
> Do you think taking a SQL dump of the DB and then copy paste most it
> into the migration file and then run rake db:migrate??  

No way!  That will just keep the old schema.  (But see below.)

> any other
> suggestions?  I would think this is a very common thing amongst rails
> developers being that often you are given the data or some of it,
> regardless of if the DB is already relied upon or not - wanted to make
> sure I was doing things smartly

The smart thing to do:
* Look at the old DB.
* Understand the data in it.
* Figure out a way of modeling that data that Rails will like.
* Write migrations to create a new DB from scratch. (It might look 
nothing like the old one.)
* Import data as appropriate.

Alternatively, start by duplicating the legacy schem as you suggested, 
then refactor it bit by bit.

 Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

-- 
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.

Reply via email to