Commit b83dcd3a authored by Yorick Peterse's avatar Yorick Peterse

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
parents 8b1a3d40 edb82271
...@@ -33,7 +33,7 @@ class MigrateUserExternalMailData < ActiveRecord::Migration ...@@ -33,7 +33,7 @@ class MigrateUserExternalMailData < ActiveRecord::Migration
SELECT true SELECT true
FROM user_synced_attributes_metadata FROM user_synced_attributes_metadata
WHERE user_id = users.id 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} AND id BETWEEN #{start_id} AND #{end_id}
EOF EOF
......
...@@ -33,7 +33,7 @@ class PostDeployMigrateUserExternalMailData < ActiveRecord::Migration ...@@ -33,7 +33,7 @@ class PostDeployMigrateUserExternalMailData < ActiveRecord::Migration
SELECT true SELECT true
FROM user_synced_attributes_metadata FROM user_synced_attributes_metadata
WHERE user_id = users.id 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} AND id BETWEEN #{start_id} AND #{end_id}
EOF EOF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment