Commit 542b2a7e authored by Stan Hu's avatar Stan Hu

Merge branch 'fix_failure_migrate_on_mysql8' into 'master'

Fix. db:migrate is failed on MySQL 8

See merge request gitlab-org/gitlab-ce!28351
parents 167b7641 9618141d
---
title: Fix. `db:migrate` is failed on MySQL 8
merge_request: 28351
author: sue445
type: fixed
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
# mentioned in 54f7727c850972f0401c1312a7c4a6a380de5666 # mentioned in 54f7727c850972f0401c1312a7c4a6a380de5666
class ConvertLegacyReferenceNotes < ActiveRecord::Migration[4.2] class ConvertLegacyReferenceNotes < ActiveRecord::Migration[4.2]
def up def up
execute %q{UPDATE notes SET note = trim(both '_' from note) WHERE system = true AND note LIKE '\_%\_'} quoted_column_name = ActiveRecord::Base.connection.quote_column_name('system')
execute %Q{UPDATE notes SET note = trim(both '_' from note) WHERE #{quoted_column_name} = true AND note LIKE '\_%\_'}
end end
def down def down
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment