Hi ,
I am new to the ruby on rails.
I am having some problem with migration on ruby.
any one could explain…
- what db migration on ruby.
- how to create migration.
- 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
mohan wrote:
Hi ,
I am new to the ruby on rails.
I am having some problem with migration on ruby.
any one could explain…
- what db migration on ruby.
- how to create migration.
- 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
-
Migrations are an Agile way to build up and modify a db structure
using Ruby to avoid relying on SQL.
-
$ script/generate migration MyMigrationName
$ ls db/migrate
…
00_my_migration_name.rb
…
$ vi db/migrate/00_my_migration_name.rb
-
$ RAILS_ENV=production rake db:migrate
Hope this helps.
For more: google:rails migration, first link:
http://garrettsnider.backpackit.com/pub/367902
Alan