2017-12-11 11:34:51 -05:00
|
|
|
# rubocop:disable Migration/RemoveColumn
|
2016-09-13 12:28:45 -04:00
|
|
|
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
|
|
|
|
# for more information on how to write migrations for GitLab.
|
|
|
|
|
2017-11-17 08:38:14 -05:00
|
|
|
# rubocop:disable Migration/UpdateLargeTable
|
2016-09-13 12:28:45 -04:00
|
|
|
class RemoveProjectsPushesSinceGc < ActiveRecord::Migration
|
|
|
|
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
|
2016-09-15 21:43:23 -04:00
|
|
|
add_column_with_default :projects, :pushes_since_gc, :integer, default: 0
|
2016-09-13 12:28:45 -04:00
|
|
|
end
|
|
|
|
end
|