gitlab-org--gitlab-foss/db/migrate/20160721081015_drop_and_rea...

16 lines
388 B
Ruby

class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
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