2016-07-21 10:45:03 +00:00
|
|
|
class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
# Set this constant to true if this migration requires downtime.
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
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
|