diff options
Diffstat (limited to 'db/post_migrate/20170830084744_update_gpg_signatures_verification_status.rb')
-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 |