# Migrations: how to have all data dumped into rb?

**URL:** <https://www.ruby-forum.com/t/migrations-how-to-have-all-data-dumped-into-rb/55698>\
**Category:** Rails\
**Created:** [March 23, 2006, 2:12am UTC](https://www.ruby-forum.com/t/migrations-how-to-have-all-data-dumped-into-rb/55698 "2006-03-23T02:12:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jean-Christophe\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6de8d8/32.png) [@Jean-Christophe\_M](https://www.ruby-forum.com/u/Jean-Christophe_M)\
**Post date:** [March 23, 2006, 2:12am UTC](https://www.ruby-forum.com/t/migrations-how-to-have-all-data-dumped-into-rb/55698/1 "2006-03-23T02:12:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jean-Christophe\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6de8d8/32.png) [@Jean-Christophe\_M](https://www.ruby-forum.com/u/Jean-Christophe_M)\
**Post date:** [March 23, 2006, 2:58am UTC](https://www.ruby-forum.com/t/migrations-how-to-have-all-data-dumped-into-rb/55698/2 "2006-03-23T02:58:14Z")

</div>

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](http://rails.techno-weenie.net/tip/2005/12/23/make_fixtures)

---

<div class="post-metadata">

**Author:** ![Jean-Christophe\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6de8d8/32.png) [@Jean-Christophe\_M](https://www.ruby-forum.com/u/Jean-Christophe_M)\
**Post date:** [March 23, 2006, 9:06am UTC](https://www.ruby-forum.com/t/migrations-how-to-have-all-data-dumped-into-rb/55698/3 "2006-03-23T09:06:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jean-Christophe\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6de8d8/32.png) [@Jean-Christophe\_M](https://www.ruby-forum.com/u/Jean-Christophe_M)\
**Post date:** [March 23, 2006, 4:48pm UTC](https://www.ruby-forum.com/t/migrations-how-to-have-all-data-dumped-into-rb/55698/4 "2006-03-23T16:48:36Z")

</div>

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](http://nubyonrails.com/articles/2005/12/27/dump-or-slurp-yaml-reference-data)

I’ve been saving it for a rainy day

Craig
