Browse files

Migrations: move massive paragraph out of intro.

Most of the guides have a few simple sentences describing what they will show
you at the top. This one had a few big paragraphs. I've moved those paragraphs
down to an introductory one, and written a new smaller one for the introduction.
This makes this guide more consistent with the others.
  • Loading branch information...
1 parent 28e8abf commit 0c294e0010810e3d9a4bcfa72ab96ff2af0240a6 @steveklabnik steveklabnik committed Nov 29, 2012
Showing with 19 additions and 10 deletions.
  1. +19 −10 guides/source/migrations.md
View
29 guides/source/migrations.md
@@ -1,6 +1,23 @@
Migrations
==========
+Migrations are a feature of Active Record that allows you to evolve your
+database schema over time. Rather than write schema modifications in pure SQL,
+migrations allow you to use an easy Ruby DSL to describe changes to your
+tables.
+
+In this guide, you'll learn all about migrations including:
+
+* The generators you can use to create them
+* The methods Active Record provides to manipulate your database
+* The Rake tasks that manipulate them
+* How they relate to `schema.rb`
+
+--------------------------------------------------------------------------------
+
+What are Migrations?
+--------------------
+
Migrations are a convenient way for you to alter your database in a structured
and organized manner. You could edit fragments of SQL by hand but you would then
be responsible for telling other developers that they need to go and run them.
@@ -9,7 +26,8 @@ production machines next time you deploy.
Active Record tracks which migrations have already been run so all you have to
do is update your source and run `rake db:migrate`. Active Record will work out
-which migrations should be run. Active Record will also update your `db/schema.rb` file to match the up-to-date structure of your database.
+which migrations should be run. Active Record will also update your
+`db/schema.rb` file to match the up-to-date structure of your database.
Migrations also allow you to describe these transformations using Ruby. The
great thing about this is that (like most of Active Record's functionality) it
@@ -18,15 +36,6 @@ is database independent: you don't need to worry about the precise syntax of
drop down to raw SQL for database specific features). For example, you could use
SQLite3 in development, but MySQL in production.
-In this guide, you'll learn all about migrations including:
-
-* The generators you can use to create them
-* The methods Active Record provides to manipulate your database
-* The Rake tasks that manipulate them
-* How they relate to `schema.rb`
-
---------------------------------------------------------------------------------
-
Anatomy of a Migration
----------------------

0 comments on commit 0c294e0

Please sign in to comment.