diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-08-30 11:56:58 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-09-05 13:18:33 +0300 |
commit | 31ad752e0688677c0113d4b324c759413858297b (patch) | |
tree | 5e888c98e154afddb3f32e00a370906be4339404 | |
parent | c8e4bbb1ecd18b11ae6e7d55af31e8889e4b560c (diff) |
update all signatures with the verification status
-rw-r--r-- | db/post_migrate/20170830084744_update_gpg_signatures_verification_status.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/db/post_migrate/20170830084744_update_gpg_signatures_verification_status.rb b/db/post_migrate/20170830084744_update_gpg_signatures_verification_status.rb new file mode 100644 index 00000000000..16337b83992 --- /dev/null +++ b/db/post_migrate/20170830084744_update_gpg_signatures_verification_status.rb @@ -0,0 +1,14 @@ +class UpdateGpgSignaturesVerificationStatus < ActiveRecord::Migration + DOWNTIME = false + + def up + GpgSignature.where(verification_status: nil).find_each do |gpg_signature| + gpg_signature.gpg_commit.update_signature!(gpg_signature) + end + end + + def down + # we can't revert setting the verification_status, but actually we don't + # need to really, as setting this is not a harmful change. + end +end |