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