Migrations: how to have all data dumped into rb?


#1

Hi,

I dumped the schema using rake db_schema_dump.
Now how do I create a migration containing all the data I have in my dev
db ?


Jean-Christophe M.


#2

I have seen code to achieve that in the Rails Recipes book and at
techno-weenie:

http://rails.techno-weenie.net/tip/2005/12/23/make_fixtures


#3

Roberto S. wrote:

I have seen code to achieve that in the Rails Recipes book and at
techno-weenie:

http://rails.techno-weenie.net/tip/2005/12/23/make_fixtures

Thanks !

Why isn’t there a way to dump content and not only structure ?
rake db_dump_content would seem useful to me, why am I the first one to
need it ?

And how all of you handle the back data flow: having new data from
production db go back into development db ? (migrate back to the version
in prod, import data from prod, migrate to last dev version)


Jean-Christophe M.


#4

On Thu, 2006-03-23 at 09:05 +0100, Jean-Christophe M. wrote:

need it ?

And how all of you handle the back data flow: having new data from
production db go back into development db ? (migrate back to the version
in prod, import data from prod, migrate to last dev version)


is this useful to you?
http://nubyonrails.com/articles/2005/12/27/dump-or-slurp-yaml-reference-data

I’ve been saving it for a rainy day

Craig