aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorjordanstaub <jstaub@telvue.com>2012-05-28 20:53:04 -0400
committerjordanstaub <jstaub@telvue.com>2012-05-28 20:53:04 -0400
commitcfe731c26bcf583d4fa99a4ac67bb3963ccfc011 (patch)
treeefa56fb27ce54db0bbd0fdfe303646518fdf9748 /guides/source
parent724d6fa6bb48b61798c223b47dd27155839c40d5 (diff)
downloadrails-cfe731c26bcf583d4fa99a4ac67bb3963ccfc011.tar.gz
rails-cfe731c26bcf583d4fa99a4ac67bb3963ccfc011.tar.bz2
rails-cfe731c26bcf583d4fa99a4ac67bb3963ccfc011.zip
Added information regarding the schema_migrations table in Active Record Migrations guide.
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/migrations.textile10
1 files changed, 8 insertions, 2 deletions
diff --git a/guides/source/migrations.textile b/guides/source/migrations.textile
index 52dba76e68..909815d6d7 100644
--- a/guides/source/migrations.textile
+++ b/guides/source/migrations.textile
@@ -8,8 +8,14 @@ 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. It will also update your +db/schema.rb+ file to
-match the structure of your database.
+which migrations should be run by checking the hidden +schema_mirgrations+ database
+table, which is created automatically after the initial invocaton of +rake db:migrate+.
++schema_migrations+ contains a sole column named +versions+ that holds the time
+stamps that are preappended to generated Active Record migrations. Each time stamp
+contained in +schema_migrations+ indicate that the migration associated with the
+time stamp has previously been invoked, and does not need to be run on future
++rake db:migrate+ invocations. 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