[Rails] Re: creating a development db from existing db

Dewet Diener
2006-08-11T09:48:32Z

Chris Finch wrote:
> Is this possible? - I have heard of doing a ''schema
dump'', what about a
> data dump. The data in the existing db is important - I worry that doing
> something could delete the data. Is this fear unfounded?

What we''ve done here is use a plugin called ar_fixtures which allows
you
to dump the data corresponding to a model.  So we''ve taken a copy of
the
production data from the legacy app, renamed the tables and fields in
SQL to correspond with our model, and then use "rake db:fixtures:dump
MODEL=Product" to create a fixture for that model.  This is then simple
to reload (after a migration/recreation) through "rake
db:fixtures:load".

d


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