reset issues_count
This commit is contained in:
parent
463c1fe7a4
commit
de1e748e25
|
@ -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
|
Loading…
Reference in New Issue