diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-14 14:03:28 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-14 14:04:26 +0300 |
commit | 208f99ff6c24a2dd5a69ed5666a1fd224d78c59b (patch) | |
tree | 02ed72e97ef7ab5949227e4807e4cf64a5800812 /db | |
parent | 45593d574ce0d851711ea776c9f9fd673eec689c (diff) |
Fix MySQL migration of CI emails [ci skip]
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20151209145909_migrate_ci_emails.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/db/migrate/20151209145909_migrate_ci_emails.rb b/db/migrate/20151209145909_migrate_ci_emails.rb index 202fac8e3fc..7f330a2cf0a 100644 --- a/db/migrate/20151209145909_migrate_ci_emails.rb +++ b/db/migrate/20151209145909_migrate_ci_emails.rb @@ -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 |