summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-09-25 14:39:25 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2017-09-25 14:39:25 +0000
commitb83dcd3a30539f86b13d91ffd24fb708652eae80 (patch)
treef79634def8fab442796030d0e0330f640f2787d0
parent8b1a3d40e76093ff6ffd28a6e08280f4b29afc8e (diff)
parentedb82271ae9024123dd67df0ac4dd82d89021543 (diff)
downloadgitlab-ce-b83dcd3a30539f86b13d91ffd24fb708652eae80.tar.gz
Merge branch 'sh-fix-email-provider-take2' into 'master'
Fix PG::UniqueViolation external_email migration Closes #38246 See merge request gitlab-org/gitlab-ce!14474
-rw-r--r--db/migrate/20170828135939_migrate_user_external_mail_data.rb2
-rw-r--r--db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20170828135939_migrate_user_external_mail_data.rb b/db/migrate/20170828135939_migrate_user_external_mail_data.rb
index 395181a3b22..f7ac87374b6 100644
--- a/db/migrate/20170828135939_migrate_user_external_mail_data.rb
+++ b/db/migrate/20170828135939_migrate_user_external_mail_data.rb
@@ -33,7 +33,7 @@ class MigrateUserExternalMailData < ActiveRecord::Migration
SELECT true
FROM user_synced_attributes_metadata
WHERE user_id = users.id
- AND provider = users.email_provider OR (provider IS NULL AND users.email_provider IS NULL)
+ AND (provider = users.email_provider OR (provider IS NULL AND users.email_provider IS NULL))
)
AND id BETWEEN #{start_id} AND #{end_id}
EOF
diff --git a/db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb b/db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb
index a475b242921..fd1437b07f5 100644
--- a/db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb
+++ b/db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb
@@ -33,7 +33,7 @@ class PostDeployMigrateUserExternalMailData < ActiveRecord::Migration
SELECT true
FROM user_synced_attributes_metadata
WHERE user_id = users.id
- AND provider = users.email_provider OR (provider IS NULL AND users.email_provider IS NULL)
+ AND (provider = users.email_provider OR (provider IS NULL AND users.email_provider IS NULL))
)
AND id BETWEEN #{start_id} AND #{end_id}
EOF