diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-08-30 10:56:58 +0200 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-09-05 12:18:33 +0200 |
commit | 31ad752e0688677c0113d4b324c759413858297b (patch) | |
tree | 5e888c98e154afddb3f32e00a370906be4339404 /db/post_migrate | |
parent | c8e4bbb1ecd18b11ae6e7d55af31e8889e4b560c (diff) | |
download | gitlab-ce-31ad752e0688677c0113d4b324c759413858297b.tar.gz |
update all signatures with the verification status
Diffstat (limited to 'db/post_migrate')
-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 |