Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What are migrations in Rails?

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
In Rails applications, what are "Database Migrations"?
Thanks.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic