summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authortiagonbotelho <tiagonbotelho@hotmail.com>2016-07-22 16:06:01 +0100
committertiagonbotelho <tiagonbotelho@hotmail.com>2016-07-22 16:06:01 +0100
commit8c4b6397e39e6ce01a3df88843e91e6f99994f8d (patch)
tree4685ebc520489555138ff3e66a36f1b0021ba9f3 /db
parent8f86d931498bc01b95205ef70bc86eb9c81bbf57 (diff)
parent033e5423a2594e08a7ebcd2379bd2331f4c39032 (diff)
downloadgitlab-ce-8c4b6397e39e6ce01a3df88843e91e6f99994f8d.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb b/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb
index 459a120155d..1eb99feb40c 100644
--- a/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb
+++ b/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb
@@ -5,8 +5,9 @@ class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration
DOWNTIME = false
def up
- remove_column :projects, :has_external_wiki, :boolean
- add_column :projects, :has_external_wiki, :boolean
+ 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