diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-09-04 12:45:17 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-09-05 13:18:34 +0300 |
commit | 703b39d4405af553b142071634db006941272db6 (patch) | |
tree | ea83ff7967d56436abae45ba7ea223b564015f9a /db/post_migrate | |
parent | c4bb09bdb80817b84b6fbbdbda75907125c0512d (diff) |
truncate gpg signature instead of destroy
Diffstat (limited to 'db/post_migrate')
-rw-r--r-- | db/post_migrate/20170830084744_destroy_gpg_signatures.rb | 13 |
1 files changed, 1 insertions, 12 deletions
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 |