reset issues_count

This commit is contained in:
sylor_huang@126.com 2020-07-16 13:55:25 +08:00
parent 463c1fe7a4
commit de1e748e25
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
class ResetProjectIssuesCounte < ActiveRecord::Migration[5.2]
def change
projects = Project.select(:id, :issues_count).all
projects.each do |p|
puts p.id
Project.reset_counters( p.id, :issues_count, touch: false )
end
end
end