# Dumping current database to a migration?

**URL:** <https://www.ruby-forum.com/t/dumping-current-database-to-a-migration/81291>\
**Category:** Rails\
**Created:** [January 6, 2007, 8:56pm UTC](https://www.ruby-forum.com/t/dumping-current-database-to-a-migration/81291 "2007-01-06T20:56:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![asetzler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac91a4/32.png) [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Post date:** [January 6, 2007, 8:56pm UTC](https://www.ruby-forum.com/t/dumping-current-database-to-a-migration/81291/1 "2007-01-06T20:56:42Z")

</div>

Hi.

I’m a Rubynuby and I was wondering if it’s possible to dump the current  
state of my database (all the rows in different tables) to a form of a  
migration?

I don’t know if I made myself clear enough, so let me elaborate:  
Me and a few of my friends are working on a project using cvs. I added  
_lots_ of testing data (in the database) and I want all of my coworkers  
to have the same content of the databases as I do. Is there a way that I  
can create a migration which transforms an empty database into a  
database filled with records (not random records, my records 😉 ).

Oh, and sorry for my English.

---

<div class="post-metadata">

**Author:** ![asetzler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac91a4/32.png) [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Post date:** [January 6, 2007, 9:34pm UTC](https://www.ruby-forum.com/t/dumping-current-database-to-a-migration/81291/2 "2007-01-06T21:34:54Z")

</div>

Adam Sosnowski wrote:

> Hi.
> 
> I’m a Rubynuby and I was wondering if it’s possible to dump the current  
> state of my database (all the rows in different tables) to a form of a  
> migration?
> 
> I don’t know if I made myself clear enough, so let me elaborate:  
> Me and a few of my friends are working on a project using cvs. I added  
> _lots_ of testing data (in the database) and I want all of my coworkers  
> to have the same content of the databases as I do. Is there a way that I  
> can create a migration which transforms an empty database into a  
> database filled with records (not random records, my records 😉 ).
> 
> Oh, and sorry for my English.

take a look at [http://www.agilewebdevelopment.com/plugins/migration2](http://www.agilewebdevelopment.com/plugins/migration2)

---

<div class="post-metadata">

**Author:** ![asetzler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac91a4/32.png) [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Post date:** [January 6, 2007, 9:35pm UTC](https://www.ruby-forum.com/t/dumping-current-database-to-a-migration/81291/3 "2007-01-06T21:35:38Z")

</div>

I mean this one

[http://www.agilewebdevelopment.com/plugins/mysql\_tasks](http://www.agilewebdevelopment.com/plugins/mysql_tasks)

opps!!!

---

<div class="post-metadata">

**Author:** ![asetzler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac91a4/32.png) [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Post date:** [January 7, 2007, 3:54pm UTC](https://www.ruby-forum.com/t/dumping-current-database-to-a-migration/81291/4 "2007-01-07T15:54:53Z")

</div>

Adam Sosnowski wrote:

> Hi.
> 
> I’m a Rubynuby and I was wondering if it’s possible to dump the current  
> state of my database (all the rows in different tables) to a form of a  
> migration?
> 
> I don’t know if I made myself clear enough, so let me elaborate:  
> Me and a few of my friends are working on a project using cvs. I added  
> _lots_ of testing data (in the database) and I want all of my coworkers  
> to have the same content of the databases as I do. Is there a way that I  
> can create a migration which transforms an empty database into a  
> database filled with records (not random records, my records 😉 ).
> 
> Oh, and sorry for my English.

If you’re trying to share test data you should consider creating  
fixtures with this information and actually writing automated tests.
