@@ -624,6 +624,7 @@ actions automatically. Below are some of the actions that `change` supports:
624
624
* ` enable_extension `
625
625
* [ ` remove_check_constraint ` ] [ ] (must supply a constraint expression)
626
626
* [ ` remove_column ` ] [ ] (must supply a type)
627
+ * [ ` remove_columns ` ] [ ] (must supply a ` :type ` option)
627
628
* [ ` remove_foreign_key ` ] [ ] (must supply a second table)
628
629
* [ ` remove_index ` ] [ ]
629
630
* [ ` remove_reference ` ] [ ]
@@ -632,8 +633,8 @@ actions automatically. Below are some of the actions that `change` supports:
632
633
* [ ` rename_index ` ] [ ]
633
634
* [ ` rename_table ` ] [ ]
634
635
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 .
637
638
638
639
` remove_column ` is reversible if you supply the column type as the third
639
640
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.
659
660
[ `remove_reference` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-remove_reference
660
661
[ `remove_timestamps` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-remove_timestamps
661
662
[ `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
662
664
[ `rename_index` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-rename_index
663
665
[ `rename_table` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-rename_table
664
666
0 commit comments