class ActiveRecord::ConnectionAdapters::Table

def check_constraint_exists?(*args, **options)

See {connection.check_constraint_exists?}[rdoc-ref:SchemaStatements#check_constraint_exists?]

end
t.check_constraint("price > 0", name: "price_check")
unless t.check_constraint_exists?(name: "price_check")

Checks if a check_constraint exists on a table.
def check_constraint_exists?(*args, **options)
  @base.check_constraint_exists?(name, *args, **options)
end