# Any way to convert migration

**URL:** <https://www.ruby-forum.com/t/any-way-to-convert-migration/107496>\
**Category:** Rails\
**Created:** [June 22, 2007, 9:20am UTC](https://www.ruby-forum.com/t/any-way-to-convert-migration/107496 "2007-06-22T09:20:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arun123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/58f4c7/32.png) [@arun123](https://www.ruby-forum.com/u/arun123)\
**Post date:** [June 22, 2007, 9:20am UTC](https://www.ruby-forum.com/t/any-way-to-convert-migration/107496/1 "2007-06-22T09:20:41Z")

</div>

Hi all,

I have a mysql dump for my app. i need to generate migration files  
through  
it.  
is there any way to convert mysql dump data into migration files.

## reply Thanks

Arun A.

---

<div class="post-metadata">

**Author:** ![arun123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/58f4c7/32.png) [@arun123](https://www.ruby-forum.com/u/arun123)\
**Post date:** [June 22, 2007, 3:28pm UTC](https://www.ruby-forum.com/t/any-way-to-convert-migration/107496/2 "2007-06-22T15:28:36Z")

</div>

If it is just schema definition, you can load it to the DB, run ‘rake  
db:schema:dump’, and to copy/modify db/schema.rb to be your first  
migration. If there is data, you can use DataLoader to load your SQL  
directly from a migration:

> **[Data Loaders in Migrations](http://revolutiononrails.blogspot.com/2007/02/data-loaders-in-migrations.html)**
>
> Two cases of data usage at RHG (as outlined in the DB Migrations With a Twist post) - migration consolidations and test data creation via ...

Val
