8784: Fix test for latest firefox.
[arvados.git] / services / api / db / migrate / 20160901210110_repair_script_parameters_digest.rb
1 class RepairScriptParametersDigest < ActiveRecord::Migration
2   def up
3     Job.find_each do |j|
4       have = j.script_parameters_digest
5       want = j.update_script_parameters_digest
6       if have != want
7         # where().update_all() skips validations, event logging, and
8         # timestamp updates, and just runs SQL. (This change is
9         # invisible to clients.)
10         Job.where('id=?', j.id).update_all(script_parameters_digest: want)
11       end
12     end
13   end
14
15   def down
16   end
17 end