Prev | Current Page 137 | Next

Kevin Marshall, Chad Pytel, and Jon Yurek

"Pro Active Record: Databases with Ruby and Rails"


If you aren??™t excited by now about working with Active Record migrations, then you??™re
either in the wrong profession or you just haven??™t suffered through the traditional approach
enough yet (build a few more midsized Java applications and then come check out Ruby and
Active Record)! For the rest of us who can??™t wait any longer, let??™s get into the details of actually
using migrations??”and what better place to start then with how to execute your migration
scripts.
Executing Migration Scripts
Migrations, like Active Record itself, evolved out of the Rails framework, so migrations are still
somewhat tightly coupled with the Ruby on Rails framework. If you want to run migrations
outside of the Rails framework, it??™s very feasible, but you will need to do just a little bit more
work than if you want to run migrations within your Rails framework. To be thorough, we??™ll
explain how to execute migrations in both situations, starting with the Ruby on Rails framework.
Executing Migrations Within Ruby on Rails
Within a Ruby on Rails project, migrations are stored in the db/migrations folder and are named
by prepending numbers, in sequential order, to the script name.


Pages:
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149