@@ -606,6 +606,7 @@ The `change` method is the primary way of writing migrations. It works for the
606
606
majority of cases in which Active Record knows how to reverse a migration's
607
607
actions automatically. Below are some of the actions that ` change ` supports:
608
608
609
+ * [ ` add_check_constraint ` ] [ ]
609
610
* [ ` add_column ` ] [ ]
610
611
* [ ` add_foreign_key ` ] [ ]
611
612
* [ ` add_index ` ] [ ]
@@ -621,6 +622,7 @@ actions automatically. Below are some of the actions that `change` supports:
621
622
* [ ` drop_join_table ` ] [ ]
622
623
* [ ` drop_table ` ] [ ] (must supply a block)
623
624
* ` enable_extension `
625
+ * [ ` remove_check_constraint ` ] [ ] (must supply a constraint expression)
624
626
* [ ` remove_column ` ] [ ] (must supply a type)
625
627
* [ ` remove_foreign_key ` ] [ ] (must supply a second table)
626
628
* [ ` remove_index ` ] [ ]
@@ -644,12 +646,14 @@ remove_column :posts, :slug, :string, null: false, default: ''
644
646
If you're going to need to use any other methods, you should use ` reversible `
645
647
or write the ` up ` and ` down ` methods instead of using the ` change ` method.
646
648
649
+ [ `add_check_constraint` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_check_constraint
647
650
[ `add_foreign_key` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_foreign_key
648
651
[ `add_timestamps` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_timestamps
649
652
[ `change_column_comment` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-change_column_comment
650
653
[ `change_table_comment` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-change_table_comment
651
654
[ `drop_join_table` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-drop_join_table
652
655
[ `drop_table` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-drop_table
656
+ [ `remove_check_constraint` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-remove_check_constraint
653
657
[ `remove_foreign_key` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-remove_foreign_key
654
658
[ `remove_index` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-remove_index
655
659
[ `remove_reference` ] : https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-remove_reference
0 commit comments