diff options
author | Stan Hu <stanhu@gmail.com> | 2017-09-25 06:17:48 -0400 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-09-25 06:17:48 -0400 |
commit | edb82271ae9024123dd67df0ac4dd82d89021543 (patch) | |
tree | 806ac52c9eba5dcc34f1871222ede7fae5f71631 /db | |
parent | 6c57d894688930de25521fa1e276c6c2990b6d7a (diff) | |
download | gitlab-ce-edb82271ae9024123dd67df0ac4dd82d89021543.tar.gz |
Fix PG::UniqueViolation external_email migrationsh-fix-email-provider-take2
Missing parens prevented this migration from working in some cases.
Closes #38246
Diffstat (limited to 'db')
-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 |