diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-23 13:40:19 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-23 13:40:41 +0100 |
commit | b61f6f59805eec4f5bb873a85910c9fe00e839a9 (patch) | |
tree | 485dc3cee827ab4d79756e90d639ccc4dad464e1 /railties/lib/generators/rails/migration | |
parent | b144b56d8288246f0de7437d10361a0f1ed2bd83 (diff) | |
download | rails-b61f6f59805eec4f5bb873a85910c9fe00e839a9.tar.gz rails-b61f6f59805eec4f5bb873a85910c9fe00e839a9.tar.bz2 rails-b61f6f59805eec4f5bb873a85910c9fe00e839a9.zip |
Load generators from both lib/rails/generators and lib/generators. Using the former since it's less obstrusive.
Diffstat (limited to 'railties/lib/generators/rails/migration')
-rw-r--r-- | railties/lib/generators/rails/migration/USAGE | 29 | ||||
-rw-r--r-- | railties/lib/generators/rails/migration/migration_generator.rb | 8 |
2 files changed, 0 insertions, 37 deletions
diff --git a/railties/lib/generators/rails/migration/USAGE b/railties/lib/generators/rails/migration/USAGE deleted file mode 100644 index d21c81b760..0000000000 --- a/railties/lib/generators/rails/migration/USAGE +++ /dev/null @@ -1,29 +0,0 @@ -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 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 - -Example: - `rails generate migration AddSslFlag` - - 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 - - `rails generate migration AddTitleBodyToPost title:string body:text published:boolean` - - 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 - add_column :posts, :body, :text - add_column :posts, :published, :boolean - - And this in the Down migration: - - remove_column :posts, :published - remove_column :posts, :body - remove_column :posts, :title diff --git a/railties/lib/generators/rails/migration/migration_generator.rb b/railties/lib/generators/rails/migration/migration_generator.rb deleted file mode 100644 index 39fa5b63b1..0000000000 --- a/railties/lib/generators/rails/migration/migration_generator.rb +++ /dev/null @@ -1,8 +0,0 @@ -module Rails - module Generators - class MigrationGenerator < NamedBase #metagenerator - argument :attributes, :type => :array, :default => [], :banner => "field:type field:type" - hook_for :orm, :required => true - end - end -end |