dawarich/db/data/20240822094532_add_counter_cache_to_imports.rb

14 lines
265 B
Ruby
Raw Permalink Normal View History

2024-08-22 16:40:27 -04:00
# frozen_string_literal: true
class AddCounterCacheToImports < ActiveRecord::Migration[7.1]
def up
Import.find_each do |import|
Import.reset_counters(import.id, :points)
end
end
def down
raise ActiveRecord::IrreversibleMigration
end
end