2017-11-17 13:38:14 +00:00
|
|
|
# rubocop:disable Migration/UpdateLargeTable
|
2017-05-23 12:57:03 +00:00
|
|
|
# rubocop:disable Migration/UpdateColumnInBatches
|
2018-11-13 07:27:31 +00:00
|
|
|
class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration[4.2]
|
2016-07-21 10:45:03 +00:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
# Set this constant to true if this migration requires downtime.
|
|
|
|
DOWNTIME = false
|
|
|
|
|
2017-06-21 12:35:06 +00:00
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2016-07-21 10:45:03 +00:00
|
|
|
def up
|
2016-07-21 15:43:43 +00:00
|
|
|
update_column_in_batches(:projects, :has_external_wiki, nil) do |table, query|
|
|
|
|
query.where(table[:has_external_wiki].not_eq(nil))
|
|
|
|
end
|
2016-07-21 10:45:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
end
|
|
|
|
end
|