class AddTripRatingCheckConstraint < ActiveRecord::Migration[7.0]
def change
add_check_constraint :users, "rating >= 1 AND rating <= 5",
name: "rating_check"
end
end
add_check_constraint :users,
should be add_check_constraint :trips,