debian-mirror-gitlab/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb

22 lines
602 B
Ruby
Raw Normal View History

2018-03-17 18:26:18 +05:30
# rubocop:disable Migration/RemoveColumn
2016-09-29 09:46:39 +05:30
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
2018-03-17 18:26:18 +05:30
# rubocop:disable Migration/UpdateLargeTable
2019-02-15 15:39:39 +05:30
class RemoveProjectsPushesSinceGc < ActiveRecord::Migration[4.2]
2016-09-29 09:46:39 +05:30
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
DOWNTIME_REASON = 'This migration removes an existing column'
disable_ddl_transaction!
def up
remove_column :projects, :pushes_since_gc
end
def down
add_column_with_default :projects, :pushes_since_gc, :integer, default: 0
end
end