aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/migrations/rakeing_around.txt
diff options
context:
space:
mode:
Diffstat (limited to 'railties/doc/guides/migrations/rakeing_around.txt')
-rw-r--r--railties/doc/guides/migrations/rakeing_around.txt14
1 files changed, 7 insertions, 7 deletions
diff --git a/railties/doc/guides/migrations/rakeing_around.txt b/railties/doc/guides/migrations/rakeing_around.txt
index 5635ff42f5..ff06af5ee1 100644
--- a/railties/doc/guides/migrations/rakeing_around.txt
+++ b/railties/doc/guides/migrations/rakeing_around.txt
@@ -1,13 +1,13 @@
== Running Migrations ==
-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 `db:migrate`. In its most basic form it just runs the up method for all the migrations that have not yet been run. If there are no such migrations it exits.
+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 `db:migrate`. In its most basic form it just runs the `up` method for all the migrations that have not yet been run. If there are no such migrations it exits.
-If you specify a target version. Active Record will run the required migrations (up or down) until it has reached the specified version. The
+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
`rake db:migrate VERSION=20080906120000`
-If this is greater than the current version (i.e. it is migrating upwards) this will run all the up method on all migrations up to and including 20080906120000, if migrating downwards this will run the down method on all the migrations down to, but not including, 20080906120000.
+If this is greater than the current version (i.e. it is migrating upwards) this will run the `up` method on all migrations up to and including 20080906120000, if migrating downwards this will run the `down` method on all the migrations down to, but not including, 20080906120000.
Almost all the functionality provided by other rake tasks could be done using `db:migrate` but would be more tedious (partly because of the long version numbers you would have to lookup and enter).
@@ -17,11 +17,11 @@ A common task is to rollback the last migration, for example if you made a mista
`rake db:rollback`
-This will run the down method from the latest migration. If you need to undo several migrations you can provide a `STEP` parameter:
+This will run the `down` method from the latest migration. If you need to undo several migrations you can provide a `STEP` parameter:
`rake db:rollback STEP=3`
-will run the down method fron the last 3 migrations.
+will run the `down` method fron the last 3 migrations.
The `db:migrate:redo` task is a shortcut for doing a rollback and then migrating back up again. As with the `db:rollback` task you can use the `STEP` parameter if you need to go more than one version back, for example
@@ -33,11 +33,11 @@ NOTE: this is not the same as running all the migrations - see the section on <<
=== Being Specific ===
-If you need to run a specific migration up or down the `db:migrate:up` and `db:migrate:down` tasks will do that. Just specify the appropriate version and the corresponding migration will have its up or down method invoked, for example
+If you need to run a specific migration up or down the `db:migrate:up` and `db:migrate:down` tasks will do that. Just specify the appropriate version and the corresponding migration will have its `up` or `down` method invoked, for example
`rake db:migrate:up VERSION=20080906120000`
-will run the up method from the 20080906120000 migration. These tasks check whether the migration has already run, so for example `db:migrate:up VERSION=20080906120000` will do nothing if Active Record believes that 20080906120000 has already been run.
+will run the `up` method from the 20080906120000 migration. These tasks check whether the migration has already run, so for example `db:migrate:up VERSION=20080906120000` will do nothing if Active Record believes that 20080906120000 has already been run.
=== Being talkative ===