Permalink
Browse files

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.
  • Loading branch information...
1 parent 899cae2 commit d9ce4fa7ac21dd3f623defa3cb1ac1a87b670ebe @steveklabnik steveklabnik committed Dec 26, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 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:

0 comments on commit d9ce4fa

Please sign in to comment.