Skip to content
This repository
Browse code

Change migration generator USAGE to explain the timestamped migration…

…s behaviour
  • Loading branch information...
commit a01a0178be297b0eb62909819a15a01c6b69a841 1 parent 4e2bc02
Emilio Tagua authored May 14, 2008
8  railties/lib/rails_generator/generators/components/migration/USAGE
@@ -2,7 +2,7 @@ Description:
2 2
     Stubs out a new database migration. Pass the migration name, either
3 3
     CamelCased or under_scored, and an optional list of attribute pairs as arguments.
4 4
 
5  
-    A migration class is generated in db/migrate prefixed by the latest migration number.
  5
+    A migration class is generated in db/migrate prefixed by a timestamp of the current date and time.
6 6
 
7 7
     You can name your migration in either of these formats to generate add/remove
8 8
     column lines from supplied attributes: AddColumnsToTable or RemoveColumnsFromTable
@@ -10,12 +10,12 @@ Description:
10 10
 Example:
11 11
     `./script/generate migration AddSslFlag`
12 12
 
13  
-    With 4 existing migrations, this creates the AddSslFlag migration in
14  
-    db/migrate/005_add_ssl_flag.rb
  13
+    If the current date is May 14, 2008 and the current time 09:09:12, this creates the AddSslFlag migration
  14
+    db/migrate/20080514090912_add_ssl_flag.rb
15 15
 
16 16
     `./script/generate migration AddTitleBodyToPost title:string body:text published:boolean`
17 17
     
18  
-    This will create the AddTitleBodyToPost in db/migrate/005_add_title_body_to_post.rb with
  18
+    This will create the AddTitleBodyToPost in db/migrate/20080514090912_add_title_body_to_post.rb with
19 19
     this in the Up migration:
20 20
 
21 21
       add_column :posts, :title, :string  

0 notes on commit a01a017

Please sign in to comment.
Something went wrong with that request. Please try again.