public
Fork of lifo/docrails
Description: Documentation Project for Rails
Homepage: http://weblog.rubyonrails.org/2008/5/2/help-improve-rails-documentation-on-git-branch
Clone URL: git://github.com/miloops/docrails.git
Search Repo:
Change migration generator USAGE to explain the new timestamped migrations 
behaviour
miloops (author)
Wed May 14 03:27:03 -0700 2008
commit  3d67be3d98ac71871902fd8490a538954a59c5ff
tree    c45f952fc76c0ffe26c3323586c10e2ca8038509
parent  9546ee299952c86329c4854f9b3776382c0575ff
...
2
3
4
5
 
6
7
8
...
10
11
12
13
14
 
 
15
16
17
18
 
19
20
21
...
2
3
4
 
5
6
7
8
...
10
11
12
 
 
13
14
15
16
17
 
18
19
20
21
0
@@ -2,7 +2,7 @@ Description:
0
     Stubs out a new database migration. Pass the migration name, either
0
     CamelCased or under_scored, and an optional list of attribute pairs as arguments.
0
 
0
- A migration class is generated in db/migrate prefixed by the latest migration number.
0
+ A migration class is generated in db/migrate prefixed by a timestamp of the current date and time.
0
 
0
     You can name your migration in either of these formats to generate add/remove
0
     column lines from supplied attributes: AddColumnsToTable or RemoveColumnsFromTable
0
@@ -10,12 +10,12 @@ Description:
0
 Example:
0
     `./script/generate migration AddSslFlag`
0
 
0
- With 4 existing migrations, this creates the AddSslFlag migration in
0
- db/migrate/005_add_ssl_flag.rb
0
+ If the current date is May 14, 2008 and the current time 09:09:12, this creates the AddSslFlag migration
0
+ db/migrate/20080514090912_add_ssl_flag.rb
0
 
0
     `./script/generate migration AddTitleBodyToPost title:string body:text published:boolean`
0
     
0
- This will create the AddTitleBodyToPost in db/migrate/005_add_title_body_to_post.rb with
0
+ This will create the AddTitleBodyToPost in db/migrate/20080514090912_add_title_body_to_post.rb with
0
     this in the Up migration:
0
 
0
       add_column :posts, :title, :string

Comments

    No one has commented yet.