aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/rails/generators/active_record/migration/migration_generator.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ci skip] Correct grammar, add docs to ActiveRecord migration generatorNick Cox2015-04-281-4/+5
|
* Add a `required` option to the model generatorSean Griffin2014-08-081-1/+1
| | | | | | | | | | | Syntax was chosen to follow the passing of multiple options to decimal/numeric types. Curly braces, and allowing any of `,`, `.`, or `-` to be used as a separator to avoid the need for shell quoting. (I'm intending to expand this to all columns, but that's another PR. The `required` option will cause 2 things to change. `required: true` will be added to the association. `null: false` will be added to the column in the migration.
* Fix Generation of proper migration whenKuldeep Aggarwal2014-03-251-3/+7
| | | | | | | | | | | | ActiveRecord::Base.pluralize_table_names = false. Previously, generation a migration like this: rails g migration add_column_name_to_user name would not generating the correct table name. Fixes #13426.
* Added documentation for ↵aditya-kapoor2013-05-101-0/+4
| | | | ActiveRecord::Generators::MigrationGenerator.next_migration_number
* Support creating a table migration generatorSammy Larbi2013-03-011-2/+9
| | | | | | | | | | | | | | | | Sometimes you want to create a table without an associated model and test, which is also not a join table. With this commit, you can now do that. Example: rails g migration create_posts title:string or rails g migration CreatePosts title:string This commit also moves the template the model generator uses for the migration to the migration templates folder, as it seems a more sensible place for it now that it is shared code.
* nodoc AR::Generators [ci skip]Francesco Rodriguez2012-10-201-3/+3
|
* add mini-validator on creating migrationJan Bernacki2012-09-061-0/+9
| | | | move validation to AR
* Add fkey attributes to `join_table` migration generatorAleksey Magusev2012-07-191-2/+10
|
* Add join table migration generatorAleksey Magusev2012-07-181-5/+18
| | | | | | | | | | | | | For instance, running rails g migration CreateMediaJoinTable artists musics:uniq will create a migration with create_join_table :artists, :musics do |t| # t.index [:artist_id, :music_id] t.index [:music_id, :artist_id], unique: true end
* Tidy up migration types.José Valim2011-12-241-1/+1
|
* added ability to specify from cli when generating a model/migration whether ↵Dmitrii Samoilov2011-12-241-1/+1
| | | | particular property should be an index like this 'rails g model person name:string:index profile:string'
* Load generators from both lib/rails/generators and lib/generators. Using the ↵José Valim2010-03-231-0/+25
former since it's less obstrusive.