From a01a0178be297b0eb62909819a15a01c6b69a841 Mon Sep 17 00:00:00 2001 From: miloops Date: Wed, 14 May 2008 09:22:39 +0000 Subject: Change migration generator USAGE to explain the timestamped migrations behaviour --- .../lib/rails_generator/generators/components/migration/USAGE | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/lib') diff --git a/railties/lib/rails_generator/generators/components/migration/USAGE b/railties/lib/rails_generator/generators/components/migration/USAGE index 3e914a5d7b..b83c657963 100644 --- a/railties/lib/rails_generator/generators/components/migration/USAGE +++ b/railties/lib/rails_generator/generators/components/migration/USAGE @@ -2,7 +2,7 @@ Description: Stubs out a new database migration. Pass the migration name, either CamelCased or under_scored, and an optional list of attribute pairs as arguments. - A migration class is generated in db/migrate prefixed by the latest migration number. + A migration class is generated in db/migrate prefixed by a timestamp of the current date and time. You can name your migration in either of these formats to generate add/remove column lines from supplied attributes: AddColumnsToTable or RemoveColumnsFromTable @@ -10,12 +10,12 @@ Description: Example: `./script/generate migration AddSslFlag` - With 4 existing migrations, this creates the AddSslFlag migration in - db/migrate/005_add_ssl_flag.rb + If the current date is May 14, 2008 and the current time 09:09:12, this creates the AddSslFlag migration + db/migrate/20080514090912_add_ssl_flag.rb `./script/generate migration AddTitleBodyToPost title:string body:text published:boolean` - This will create the AddTitleBodyToPost in db/migrate/005_add_title_body_to_post.rb with + This will create the AddTitleBodyToPost in db/migrate/20080514090912_add_title_body_to_post.rb with this in the Up migration: add_column :posts, :title, :string -- cgit v1.2.3