Fix MySQL migration of CI emails [ci skip]
This commit is contained in:
parent
45593d574c
commit
208f99ff6c
1 changed files with 5 additions and 1 deletions
|
@ -25,7 +25,11 @@ class MigrateCiEmails < ActiveRecord::Migration
|
|||
|
||||
# This function escapes double-quotes and slash
|
||||
def escape_text(name)
|
||||
"REPLACE(REPLACE(#{name}, '\\', '\\\\'), '\"', '\\\"')"
|
||||
if Gitlab::Database.postgresql?
|
||||
"REPLACE(REPLACE(#{name}, '\\', '\\\\'), '\"', '\\\"')"
|
||||
else
|
||||
"REPLACE(REPLACE(#{name}, '\\\\', '\\\\\\\\'), '\\\"', '\\\\\\\"')"
|
||||
end
|
||||
end
|
||||
|
||||
# This function returns 0 or 1 for column
|
||||
|
|
Loading…
Reference in a new issue