Fix MySQL compatibility in zero downtime migration helpers
What does this MR do?
This MR fixes MySQL for zero downtime migration helpers introduced in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3860
Closes #17711 (closed)
Merge request reports
Activity
Added 1 commit:
- 2df8b48d - Add MySQL compatibility fix in migration helpers
mentioned in issue #17519 (closed)
Added 1 commit:
- 7f9092da - Extend comment for migrations helper MySQL fix
Added 1 commit:
- 891888aa - Add Changelog entry for MySQL compatibility fix
Enabled an automatic merge when the build for 891888aa succeeds
mentioned in commit b4c47368
mentioned in issue #17715 (closed)
mentioned in issue #17725 (closed)
2 2 3 3 describe Gitlab::Database::MigrationHelpers, lib: true do 4 4 let(:model) do 5 Class.new do 6 include Gitlab::Database::MigrationHelpers 7 8 def method_missing(name, *args, &block) 9 ActiveRecord::Base.connection.send(name, *args, &block) 10 end 11 end.new 5 ActiveRecord::Migration.new.extend( 6 Gitlab::Database::MigrationHelpers 7 ) 12 8 end 13 9 10 before { allow(model).to receive(:puts) } @rspeicher I'm not sure, but it will probably affect all other specs in a suite that is being run, which may not be good behavior.
39 39 def update_column_in_batches(table, column, value) 40 40 quoted_table = quote_table_name(table) 41 41 quoted_column = quote_column_name(column) 42 quoted_value = quote(value) 42 43 ## 44 # Workaround for #17711 45 # 46 # It looks like for MySQL `ActiveRecord::Base.conntection.quote(true)` Reassigned to @stanhu
@stanhu No action for you, just keeping assignee accurate.
mentioned in commit 1f9004a8
Please register or sign in to reply