Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-08-30 11:56:58 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2017-09-05 13:18:33 +0300
commit31ad752e0688677c0113d4b324c759413858297b (patch)
tree5e888c98e154afddb3f32e00a370906be4339404 /db/post_migrate
parentc8e4bbb1ecd18b11ae6e7d55af31e8889e4b560c (diff)
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.rb14
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