diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-06-21 14:35:06 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-06-21 14:35:06 +0200 |
commit | 3fd4a37d588d0b89f402e46ba633366b1a020019 (patch) | |
tree | 521b991e2f28adde64f1be9fccfe0b7b840241ce /db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb | |
parent | e4d42a62d928d31390ce29fc52891a8973784f2d (diff) | |
download | gitlab-ce-3fd4a37d588d0b89f402e46ba633366b1a020019.tar.gz |
Disable transactions in migrations that should not use it
Diffstat (limited to 'db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb')
-rw-r--r-- | db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb | 2 |
1 files changed, 2 insertions, 0 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 b2a2ce41391..abe8e701e23 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,6 +5,8 @@ class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration # Set this constant to true if this migration requires downtime. DOWNTIME = false + disable_ddl_transaction! + def up update_column_in_batches(:projects, :has_external_wiki, nil) do |table, query| query.where(table[:has_external_wiki].not_eq(nil)) |