diff options
author | Steve Klabnik <steve@steveklabnik.com> | 2012-12-26 15:24:22 -0500 |
---|---|---|
committer | Steve Klabnik <steve@steveklabnik.com> | 2012-12-26 15:24:22 -0500 |
commit | d9ce4fa7ac21dd3f623defa3cb1ac1a87b670ebe (patch) | |
tree | de9537bc08677a7ccca4a89fab91178971d3bdf7 /guides/source/migrations.md | |
parent | 899cae25ecd0f5b187cfc1a56c55ed2936885c21 (diff) | |
download | rails-d9ce4fa7ac21dd3f623defa3cb1ac1a87b670ebe.tar.gz rails-d9ce4fa7ac21dd3f623defa3cb1ac1a87b670ebe.tar.bz2 rails-d9ce4fa7ac21dd3f623defa3cb1ac1a87b670ebe.zip |
Note about migration timestamps.
We should mention that the ordering matters with regards
to timestamps, and not imply that it's just for uniqueness
purposes.
Closes #8610.
Diffstat (limited to 'guides/source/migrations.md')
-rw-r--r-- | guides/source/migrations.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/guides/source/migrations.md b/guides/source/migrations.md index 62b70b5571..f2aa72492f 100644 --- a/guides/source/migrations.md +++ b/guides/source/migrations.md @@ -108,7 +108,9 @@ of the migration. The name of the migration class (CamelCased version) should match the latter part of the file name. For example `20080906120000_create_products.rb` should define class `CreateProducts` and `20080906120001_add_details_to_products.rb` should define -`AddDetailsToProducts`. +`AddDetailsToProducts`. Rails uses this timestamp to determine which migration +should be run and in what order, so if you're copying a migration from another +application or generate a file yourself, be aware of its position in the order. Of course, calculating timestamps is no fun, so Active Record provides a generator to handle making it for you: |