# Ruby migration

**URL:** <https://www.ruby-forum.com/t/ruby-migration/88256>\
**Category:** Rails\
**Created:** [March 9, 2007, 8:15am UTC](https://www.ruby-forum.com/t/ruby-migration/88256 "2007-03-09T08:15:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 9, 2007, 8:15am UTC](https://www.ruby-forum.com/t/ruby-migration/88256/1 "2007-03-09T08:15:13Z")

</div>

Hi ,

I am new to the ruby on rails.  
I am having some problem with migration on ruby.  
any one could explain…

1. what db migration on ruby.
2. how to create migration.
3. how to migrate the “db” development to production ( now i have  
create needed to file for migration(for creating new tables) … i  
did… “rake db:migrate” command… it says nothing(no error/ no  
success command, And also no changes was made in DB)

i have some idea about 1 & 2. but i have no idea about 3. Please help  
to

Thanks & Regards,

Mohan

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 9, 2007, 11:58am UTC](https://www.ruby-forum.com/t/ruby-migration/88256/2 "2007-03-09T11:58:10Z")

</div>

mohan wrote:

> Hi ,
> 
> I am new to the ruby on rails.  
> I am having some problem with migration on ruby.  
> any one could explain…
> 
> 1. what db migration on ruby.
> 2. how to create migration.
> 3. how to migrate the “db” development to production ( now i have  
> create needed to file for migration(for creating new tables) … i  
> did… “rake db:migrate” command… it says nothing(no error/ no  
> success command, And also no changes was made in DB)
> 
> i have some idea about 1 & 2. but i have no idea about 3. Please help  
> to

1. Migrations are an Agile way to build up and modify a db structure  
using Ruby to avoid relying on SQL.

2. 

$ script/generate migration MyMigrationName  
$ ls db/migrate  
…  
00\_my\_migration\_name.rb  
…  
$ vi db/migrate/00\_my\_migration\_name.rb

1. 

$ RAILS\_ENV=production rake db:migrate

Hope this helps.

For more: google:rails migration, first link:

[http://garrettsnider.backpackit.com/pub/367902](http://garrettsnider.backpackit.com/pub/367902)

Alan
