From 20e041579f5fe9df51bdc40048cc1ef78915e116 Mon Sep 17 00:00:00 2001 From: Sammy Larbi Date: Wed, 26 Dec 2012 13:02:28 -0600 Subject: Support creating a table migration generator 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. --- activerecord/CHANGELOG.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 384ec03334..235a91fafa 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,5 +1,15 @@ ## Rails 4.0.0 (unreleased) ## +* Added support for creating a table via Rails migration generator. + For example, + + rails g migration create_books title:string content:text + + will generate a migration that creates a table called books with + the listed attributes, without creating a model. + + *Sammy Larbi* + * Fix bug that raises the wrong exception when the exception handled by PostgreSQL adapter doesn't respond to `#result`. Fixes #8617. @@ -362,7 +372,7 @@ deprecated and removed in future versions of Rails. *Amparo Luna + Guillermo Iguaran* - + * `after_commit` and `after_rollback` now validate the `:on` option and raise an `ArgumentError` if it is not one of `:create`, `:destroy` or `:update` @@ -1549,4 +1559,5 @@ *Aaron Patterson* + Please check [3-2-stable](https://github.com/rails/rails/blob/3-2-stable/activerecord/CHANGELOG.md) for previous changes. -- cgit v1.2.3