diff options
author | yui-knk <spiketeika@gmail.com> | 2015-08-30 20:28:55 +0900 |
---|---|---|
committer | yui-knk <spiketeika@gmail.com> | 2015-08-31 10:08:38 +0900 |
commit | df9cfc055a0c0888ee1c2a8b5d8ffd208a1aa33a (patch) | |
tree | 6844df2d6758f4929d11b6e1587f311a2f4f78bf /guides | |
parent | 79f44eb6c84fe1d7a7ba51f3f511d2e744788ef8 (diff) | |
download | rails-df9cfc055a0c0888ee1c2a8b5d8ffd208a1aa33a.tar.gz rails-df9cfc055a0c0888ee1c2a8b5d8ffd208a1aa33a.tar.bz2 rails-df9cfc055a0c0888ee1c2a8b5d8ffd208a1aa33a.zip |
[ci skip] Update what methods `Migration#change` can reverse
* Documentations and comments about what methods
`Migration#change` can reverse is out of date.
For example `change_column_default` is now reversible
by this [commit](https://github.com/rails/rails/pull/20018).
* Comments about `CommandRecorder` dose not match with Rails Guide.
For example `add_foreign_key` is listed only on Rails Guide.
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_record_migrations.md | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/guides/source/active_record_migrations.md b/guides/source/active_record_migrations.md index 67cd86c19b..c5ac70143d 100644 --- a/guides/source/active_record_migrations.md +++ b/guides/source/active_record_migrations.md @@ -522,20 +522,27 @@ majority of cases, where Active Record knows how to reverse the migration automatically. Currently, the `change` method supports only these migration definitions: -* `add_column` -* `add_index` -* `add_reference` -* `add_timestamps` -* `add_foreign_key` -* `create_table` -* `create_join_table` -* `drop_table` (must supply a block) -* `drop_join_table` (must supply a block) -* `remove_timestamps` -* `rename_column` -* `rename_index` -* `remove_reference` -* `rename_table` +* add_column +* add_foreign_key +* add_index +* add_reference +* add_timestamps +* change_column_default (must supply a :from and :to option) +* change_column_null +* create_join_table +* create_table +* disable_extension +* drop_join_table +* drop_table (must supply a block) +* enable_extension +* remove_column (must supply a type) +* remove_foreign_key (must supply a second table) +* remove_index +* remove_reference +* remove_timestamps +* rename_column +* rename_index +* rename_table `change_table` is also reversible, as long as the block does not call `change`, `change_default` or `remove`. |