wood burning stoves 2.0*
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
Author

What are migrations in Rails?

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

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

Joined: Jul 11, 2001
Posts: 15299
    
    6

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
Author
Rancher

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
Sheriff

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What are migrations in Rails?
 
Similar Threads
Youtube embed
Which is the hottest Java Technolgy?
What are the most common antipatterns in Rails?
What is the target of the book?
update value through migrate file