# Migration from an existing database

**URL:** <https://www.ruby-forum.com/t/migration-from-an-existing-database/151337>\
**Category:** Rails\
**Created:** [October 20, 2008, 2:40pm UTC](https://www.ruby-forum.com/t/migration-from-an-existing-database/151337 "2008-10-20T14:40:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![flaubert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/858c86/32.png) [@flaubert](https://www.ruby-forum.com/u/flaubert)\
**Post date:** [October 20, 2008, 2:40pm UTC](https://www.ruby-forum.com/t/migration-from-an-existing-database/151337/1 "2008-10-20T14:40:40Z")

</div>

hello all,

Is there some way to generate migrations from an existing database  
structure? I have the schema.rb file, but it isn’t enough for me. I  
need the migration files…

Please help!

---

<div class="post-metadata">

**Author:** ![flaubert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/858c86/32.png) [@flaubert](https://www.ruby-forum.com/u/flaubert)\
**Post date:** [October 20, 2008, 2:58pm UTC](https://www.ruby-forum.com/t/migration-from-an-existing-database/151337/2 "2008-10-20T14:58:22Z")

</div>

On 20 Oct 2008, at 13:40, flaubert wrote:

> hello all,
> 
> Is there some way to generate migrations from an existing database  
> structure? I have the schema.rb file, but it isn’t enough for me. I  
> need the migration files…

schema.rb is as close as you’re going to get. You could always chop it  
up into migrations if you really wanted to (why?)

Fred

---

<div class="post-metadata">

**Author:** ![flaubert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/858c86/32.png) [@flaubert](https://www.ruby-forum.com/u/flaubert)\
**Post date:** [October 20, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/migration-from-an-existing-database/151337/3 "2008-10-20T15:15:27Z")

</div>

just to store the database history with my team
