Commit 208f99ff authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix MySQL migration of CI emails [ci skip]

parent 45593d57
...@@ -25,7 +25,11 @@ class MigrateCiEmails < ActiveRecord::Migration ...@@ -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
......
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