Skip to content

Commit 8a1c06e

Browse files
committed
[ci skip] documentation for rails#36589
1 parent 7ebbe32 commit 8a1c06e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

activerecord/lib/active_record/migration/command_recorder.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class Migration
1313
# * add_index
1414
# * add_reference
1515
# * add_timestamps
16-
# * change_column
1716
# * change_column_default (must supply a +:from+ and +:to+ option)
1817
# * change_column_null
1918
# * change_column_comment (must supply a +:from+ and +:to+ option)
@@ -27,7 +26,7 @@ class Migration
2726
# * drop_table (must supply a block)
2827
# * enable_extension
2928
# * remove_column (must supply a type)
30-
# * remove_columns (must specify at least one column name or more)
29+
# * remove_columns (must supply a +:type+ option)
3130
# * remove_foreign_key (must supply a second table)
3231
# * remove_check_constraint
3332
# * remove_exclusion_constraint

guides/source/active_record_migrations.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ actions automatically. Below are some of the actions that `change` supports:
624624
* `enable_extension`
625625
* [`remove_check_constraint`][] (must supply a constraint expression)
626626
* [`remove_column`][] (must supply a type)
627+
* [`remove_columns`][] (must supply a `:type` option)
627628
* [`remove_foreign_key`][] (must supply a second table)
628629
* [`remove_index`][]
629630
* [`remove_reference`][]
@@ -632,8 +633,8 @@ actions automatically. Below are some of the actions that `change` supports:
632633
* [`rename_index`][]
633634
* [`rename_table`][]
634635

635-
[`change_table`][] is also reversible, as long as the block does not call `change`,
636-
`change_default` or `remove`.
636+
[`change_table`][] is also reversible, as long as the block only calls
637+
reversible operations like the ones listed above.
637638

638639
`remove_column` is reversible if you supply the column type as the third
639640
argument. Provide the original column options too, otherwise Rails can't
@@ -659,6 +660,7 @@ or write the `up` and `down` methods instead of using the `change` method.
659660
[`remove_reference`]: https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-remove_reference
660661
[`remove_timestamps`]: https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-remove_timestamps
661662
[`rename_column`]: https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-rename_column
663+
[`remove_columns`]: https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-remove_columns
662664
[`rename_index`]: https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-rename_index
663665
[`rename_table`]: https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-rename_table
664666

0 commit comments

Comments
 (0)