public
Description: PLEASE CHECK http://github.com/lifo/docrails/wikis
Homepage: http://weblog.rubyonrails.org/2008/5/2/help-improve-rails-documentation-on-git-branch
Clone URL: git://github.com/lifo/docrails.git
Change migration generator USAGE to explain the timestamped migrations 
behaviour
miloops (author)
Wed May 14 02:22:39 -0700 2008
commit  a01a0178be297b0eb62909819a15a01c6b69a841
tree    4b87515e227438c672c1b5418dd31deae8724f0e
parent  4e2bc02163aa646ab1304b1b5bec98a7af8927f5
...
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.