method
check_constraint_exists?
v7.2.3 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::ColumnMethods::Table
check_constraint_exists?(*args, **options)public
Checks if a check_constraint exists on a table.
unless t.check_constraint_exists?(name: "price_check") t.check_constraint("price > 0", name: "price_check") end
See {connection.check_constraint_exists?}[rdoc-ref:SchemaStatements#check_constraint_exists?]