debian-mirror-gitlab/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb

20 lines
516 B
Ruby
Raw Normal View History

2018-03-17 18:26:18 +05:30
# rubocop:disable Migration/UpdateLargeTable
2017-09-10 17:25:29 +05:30
# rubocop:disable Migration/UpdateColumnInBatches
2019-02-15 15:39:39 +05:30
class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration[4.2]
2016-08-24 12:49:21 +05:30
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
2017-09-10 17:25:29 +05:30
disable_ddl_transaction!
2016-08-24 12:49:21 +05:30
def up
update_column_in_batches(:projects, :has_external_wiki, nil) do |table, query|
query.where(table[:has_external_wiki].not_eq(nil))
end
end
def down
end
end