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:
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