aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/migrations.md
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2012-11-29 04:27:29 -0800
committerSteve Klabnik <steve@steveklabnik.com>2012-11-29 04:27:29 -0800
commit0c294e0010810e3d9a4bcfa72ab96ff2af0240a6 (patch)
treef640f8190409b981568e542628431c2d6b0ed444 /guides/source/migrations.md
parent28e8abfa59341377a6568413dfc207ce1e1c7909 (diff)
downloadrails-0c294e0010810e3d9a4bcfa72ab96ff2af0240a6.tar.gz
rails-0c294e0010810e3d9a4bcfa72ab96ff2af0240a6.tar.bz2
rails-0c294e0010810e3d9a4bcfa72ab96ff2af0240a6.zip
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.
Diffstat (limited to 'guides/source/migrations.md')
-rw-r--r--guides/source/migrations.md29
1 files changed, 19 insertions, 10 deletions
diff --git a/guides/source/migrations.md b/guides/source/migrations.md
index a1131f1f79..d8a7eb3abc 100644
--- a/guides/source/migrations.md
+++ b/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
----------------------