• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

What are migrations in Rails?

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
In Rails applications, what are "Database Migrations"?
Thanks.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • 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.
 
Author
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.
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • 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.
 
A berm makes a great wind break. And we all like to break wind once in a while. Like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic