The moose likes Ruby and the fly likes What are migrations in Rails? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Other Languages » Ruby
Reply 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: 3334

Hey,
In Rails applications, what are "Database Migrations"?
Thanks.
Gregg Bolinger
Sheriff

Joined: Jul 11, 2001
Posts: 15040

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.


My Blog | DZone Articles
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12612
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: 4695

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.
 
jQuery in Action, 2nd edition
 
subject: What are migrations in Rails?
 
Threads others viewed
Which is the hottest Java Technolgy?
update value through migrate file
What is the target of the book?
What are the most common antipatterns in Rails?
Youtube embed
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture