Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
0c21dc075f7c
Commit
208f99ff
authored
Dec 14, 2015
by
Kamil Trzcinski
Browse files
Fix MySQL migration of CI emails [ci skip]
parent
bdb3b9fe7445
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/migrate/20151209145909_migrate_ci_emails.rb
View file @
0c21dc07
...
...
@@ -25,7 +25,11 @@ def down
# 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment