X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3666b674330ec8d14a224932a191d6121c5974e2..3e77cae66c99a2cf3e29356a64cd230343d9762f:/app/models/changeset_comment.rb diff --git a/app/models/changeset_comment.rb b/app/models/changeset_comment.rb index ceb7d3559..3bc9483fa 100644 --- a/app/models/changeset_comment.rb +++ b/app/models/changeset_comment.rb @@ -11,7 +11,9 @@ # # Indexes # -# index_changeset_comments_on_created_at (created_at) +# index_changeset_comments_on_author_id_and_created_at (author_id,created_at) +# index_changeset_comments_on_changeset_id_and_created_at (changeset_id,created_at) +# index_changeset_comments_on_created_at (created_at) # # Foreign Keys # @@ -25,8 +27,8 @@ class ChangesetComment < ApplicationRecord validates :id, :uniqueness => true, :presence => { :on => :update }, :numericality => { :on => :update, :only_integer => true } - validates :changeset, :presence => true, :associated => true - validates :author, :presence => true, :associated => true + validates :changeset, :associated => true + validates :author, :associated => true validates :visible, :inclusion => [true, false] validates :body, :characters => true