Fix PG::UniqueViolation external_email migration
Missing parens prevented this migration from working in some cases. Closes #38246
This commit is contained in:
parent
6c57d89468
commit
edb82271ae
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue