From b3cddec30adf02af839c12b5f3f69d3a0628f774 Mon Sep 17 00:00:00 2001 From: mathmerized Date: Tue, 25 Sep 2018 10:27:21 -0400 Subject: [PATCH] make all audit results re-create --- .../20180925142205_cleanout_audit_results_assets.rb | 10 ++++++++++ lib/transam_audit/version.rb | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 db/data_migrations/20180925142205_cleanout_audit_results_assets.rb diff --git a/db/data_migrations/20180925142205_cleanout_audit_results_assets.rb b/db/data_migrations/20180925142205_cleanout_audit_results_assets.rb new file mode 100644 index 0000000..b2ef361 --- /dev/null +++ b/db/data_migrations/20180925142205_cleanout_audit_results_assets.rb @@ -0,0 +1,10 @@ +class CleanoutAuditResultsAssets < ActiveRecord::DataMigration + def up + AuditResult.destroy_all + # re-run all + Audit.all.each do |audit| + job = AuditUpdateJob.new(audit, User.find_by(first_name: 'system')) + Delayed::Job.enqueue job, :priority => 0 + end + end +end \ No newline at end of file diff --git a/lib/transam_audit/version.rb b/lib/transam_audit/version.rb index e7a3615..4b2d834 100644 --- a/lib/transam_audit/version.rb +++ b/lib/transam_audit/version.rb @@ -1,3 +1,3 @@ module TransamAudit - VERSION = "2.3.2" + VERSION = "2.3.3" end