Fix #4148: Don't prune votes.
This commit is contained in:
@@ -11,8 +11,6 @@ module DanbooruMaintenance
|
||||
PostPruner.new.prune!
|
||||
Upload.where('created_at < ?', 1.day.ago).delete_all
|
||||
Delayed::Job.where('created_at < ?', 45.days.ago).delete_all
|
||||
PostVote.prune!
|
||||
CommentVote.prune!
|
||||
PostDisapproval.prune!
|
||||
ForumSubscription.process_all!
|
||||
TagAlias.update_cached_post_counts_for_all
|
||||
|
||||
@@ -10,10 +10,6 @@ class CommentVote < ApplicationRecord
|
||||
validate :validate_comment_can_be_down_voted
|
||||
validates_inclusion_of :score, :in => [-1, 1], :message => "must be 1 or -1"
|
||||
|
||||
def self.prune!
|
||||
where("created_at < ?", 14.days.ago).delete_all
|
||||
end
|
||||
|
||||
def self.search(params)
|
||||
q = where("true")
|
||||
return q if params.blank?
|
||||
|
||||
@@ -11,10 +11,6 @@ class PostVote < ApplicationRecord
|
||||
after_create :update_post_on_create
|
||||
after_destroy :update_post_on_destroy
|
||||
|
||||
def self.prune!
|
||||
where("created_at < ?", 90.days.ago).delete_all
|
||||
end
|
||||
|
||||
def self.positive_user_ids
|
||||
select_values_sql("select user_id from post_votes where score > 0 group by user_id having count(*) > 100")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user