diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2015-08-30 19:20:22 -0600 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2015-08-30 19:20:22 -0600 |
commit | 13c690345152b8ec33919a69d6a290eed571a378 (patch) | |
tree | 336229811e3a654029341811df40c7e913622a59 /guides/source | |
parent | 1a432cd8aa805ea62c9e56afb8c6665b135196b0 (diff) | |
parent | df9cfc055a0c0888ee1c2a8b5d8ffd208a1aa33a (diff) | |
download | rails-13c690345152b8ec33919a69d6a290eed571a378.tar.gz rails-13c690345152b8ec33919a69d6a290eed571a378.tar.bz2 rails-13c690345152b8ec33919a69d6a290eed571a378.zip |
Merge pull request #21432 from yui-knk/fix/what_change_method_can_reverse
[ci skip] Update what methods `Migration#change` can reverse
Diffstat (limited to 'guides/source')
-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`. |