aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/html/migrations.html
diff options
context:
space:
mode:
Diffstat (limited to 'railties/doc/guides/html/migrations.html')
-rw-r--r--railties/doc/guides/html/migrations.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/doc/guides/html/migrations.html b/railties/doc/guides/html/migrations.html
index 8b580d8086..9f7fa28daf 100644
--- a/railties/doc/guides/html/migrations.html
+++ b/railties/doc/guides/html/migrations.html
@@ -279,7 +279,7 @@ ul#navMain {
<h1>Migrations</h1>
<div id="preamble">
<div class="sectionbody">
-<div class="para"><p>Migrations are a convenient way for you to alter your database in a structured and organised 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 it. You'd also have to keep track of which changes need to be run against the 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 <tt>rake db:migrate</tt>. Active Record will work out which migrations should be run.</p></div>
+<div class="para"><p>Migrations are a convenient way for you to alter your database in a structured and organised 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 it. You'd also have to keep track of which changes need to be run against the 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 <tt>rake db:migrate</tt>. 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.</p></div>
<div class="para"><p>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 is database independent: you don't need to worry about the precise syntax of CREATE TABLE any more that you worry about variations on SELECT * (you can drop down to raw SQL for database specific features). For example you could use SQLite3 in development, but MySQL in production.</p></div>
<div class="para"><p>You'll learn all about migrations including:</p></div>
<div class="ilist"><ul>
@@ -699,6 +699,7 @@ displayed saying that it can't be done.</p></div>
<h2 id="_running_migrations">4. Running Migrations</h2>
<div class="sectionbody">
<div class="para"><p>Rails provides a set of rake tasks to work with migrations which boils down to running certain sets of migrations. The very first migration related rake task you use will probably be <tt>db:migrate</tt>. In its most basic form it just runs the <tt>up</tt> method for all the migrations that have not yet been run. If there are no such migrations it exits.</p></div>
+<div class="para"><p>Note that running the <tt>db:migrate</tt> also invokes the <tt>db:schema:dump</tt> task, which will update your db/schema.rb file to match the structure of your database.</p></div>
<div class="para"><p>If you specify a target version, Active Record will run the required migrations (up or down) until it has reached the specified version. The
version is the numerical prefix on the migration's filename. For example to migrate to version 20080906120000 run</p></div>
<div class="listingblock">