diff options
Diffstat (limited to 'db/post_migrate/20170830084744_destroy_gpg_signatures.rb')
-rw-r--r-- | db/post_migrate/20170830084744_destroy_gpg_signatures.rb | 21 |
1 files changed, 21 insertions, 0 deletions
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 |