From 703b39d4405af553b142071634db006941272db6 Mon Sep 17 00:00:00 2001 From: Alexis Reigel Date: Mon, 4 Sep 2017 11:45:17 +0200 Subject: truncate gpg signature instead of destroy --- db/post_migrate/20170830084744_destroy_gpg_signatures.rb | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'db/post_migrate') diff --git a/db/post_migrate/20170830084744_destroy_gpg_signatures.rb b/db/post_migrate/20170830084744_destroy_gpg_signatures.rb index de2e7e79e86..b04d36f6537 100644 --- a/db/post_migrate/20170830084744_destroy_gpg_signatures.rb +++ b/db/post_migrate/20170830084744_destroy_gpg_signatures.rb @@ -1,19 +1,8 @@ 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 + truncate(:gpg_signatures) end def down -- cgit v1.2.3