File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ruby and the fly likes What are migrations in Rails? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Ruby
Bookmark "What are migrations in Rails?" Watch "What are migrations in Rails?" New topic

What are migrations in Rails?

Hussein Baghdadi
clojure forum advocate

Joined: Nov 08, 2003
Posts: 3479

In Rails applications, what are "Database Migrations"?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Um, they are database migrations. It is what is sounds like It's a means to migrate changes in your domain/model structure to the database schema.

GenRocket - Experts at Building Test Data
David Newton

Joined: Sep 29, 2008
Posts: 12617

Searching the web would probably be the easiest way to find further information.

But yes: they're programmatic changes to the DB, written in Ruby, including code to back the changes out, and so on.
Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

When I was new to Rails I was pretty confused by the term "migration" because I always understood it to mean "Labor intensive SQL project to move DATA from location A to location B."

In Rails, "migration" just means "tweak the database schema a little bit" and sometimes it also means "move some data around while changing the schema" but the moving part tends to be fairly rare - pretty much only when doing a refactoring to the domain model.

Since Rails is an agile, build-as-you-go framework, migrations typically just add more tables and columns to an existing schema.

A good workman is known by his tools.
I agree. Here's the link:
subject: What are migrations in Rails?
jQuery in Action, 3rd edition