diff --git a/db/post_migrate/20170830084744_destroy_gpg_signatures.rb b/db/post_migrate/20170830084744_destroy_gpg_signatures.rb new file mode 100644 index 00000000000..de2e7e79e86 --- /dev/null +++ b/db/post_migrate/20170830084744_destroy_gpg_signatures.rb @@ -0,0 +1,21 @@ +class DestroyGpgSignatures < ActiveRecord::Migration + DOWNTIME = false + + include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + + class GpgSignature < ActiveRecord::Base + self.table_name = 'gpg_signatures' + + include EachBatch + end + + def up + GpgSignature.each_batch do |relation| + relation.delete_all + end + end + + def down + end +end diff --git a/db/post_migrate/20170830084744_update_gpg_signatures_verification_status.rb b/db/post_migrate/20170830084744_update_gpg_signatures_verification_status.rb deleted file mode 100644 index 16337b83992..00000000000 --- a/db/post_migrate/20170830084744_update_gpg_signatures_verification_status.rb +++ /dev/null @@ -1,14 +0,0 @@ -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