Prev | Current Page 134 | Next

Kevin Marshall, Chad Pytel, and Jon Yurek

"Pro Active Record: Databases with Ruby and Rails"

If you find that you are having
trouble with a specific migration situation, you will likely want to refer to your adapter code
and documentation first.
It??™s also important to remember that with migrations you??™re actually just working with
Ruby code. Migrations can perform calculations, manipulate data, and do anything that you??™d
normally be able to do within Ruby. Because of this, migrations can prove to be a very, very
powerful tool in the Ruby programmer??™s arsenal.
In the end, using migrations means that, as a developer, you can work strictly in Ruby
code to set up and manage your database. And you can more easily switch among database
backends as you like, because all of the database SQL specifics have been abstracted for you!
Migrations are also an important part of making sure you and your development team
keep your databases in sync from revision to revision and to make sure that everything goes as
planned when you??™re deploying your applications to a different database or machine. That
sounds pretty exciting, doesn??™t it? And, believe it or not, migrations are not even all that hard
to learn or use!
Using Migrations
We??™ve mentioned the traditional steps that programmers go through when building database
applications.


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