diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2017-09-25 17:39:25 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-09-26 12:41:22 +0300 |
commit | a884273bd5c608b203ba014605c29344c61466ee (patch) | |
tree | 0804e4cff3d277f35d17f4c42aff82e26ab23010 | |
parent | d7a027ddbac2db5f4b5379e2da18afff85db3819 (diff) |
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.rb | 2 | ||||
-rw-r--r-- | db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb | 2 |
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 |