Merge branch 'sh-fix-issue-38246' into 'master'

Fix duplicate key errors in PostDeployMigrateUserExternalMailData migration

Closes #38246

See merge request gitlab-org/gitlab-ce!14460
This commit is contained in:
Yorick Peterse 2017-09-23 12:30:59 +00:00
commit b146415798
3 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
title: Fix duplicate key errors in PostDeployMigrateUserExternalMailData migration
merge_request:
author:
type: fixed

View file

@ -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
AND provider = users.email_provider OR (provider IS NULL AND users.email_provider IS NULL)
)
AND id BETWEEN #{start_id} AND #{end_id}
EOF

View file

@ -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
AND provider = users.email_provider OR (provider IS NULL AND users.email_provider IS NULL)
)
AND id BETWEEN #{start_id} AND #{end_id}
EOF