Commit 9c9c9eb7 authored by jcnventura's avatar jcnventura Committed by Joao Ventura
Browse files

Issue #3046567 by jcnventura: Fix PostgreSQL problems with update 8105

parent b31cc9ff
......@@ -121,8 +121,8 @@ function openid_connect_update_8105() {
$database = \Drupal::database();
// Get the IDs for the duplicate entries.
$query = $database->select('openid_connect_authmap', 'a1')->fields('a1', ['aid']);
$query->innerJoin('openid_connect_authmap', 'a2');
$query->where("a1.aid > a2.aid AND a1.uid = a2.uid AND a1.client_name = a2.client_name AND a1.sub = a2.sub");
$query->innerJoin('openid_connect_authmap', 'a2', 'a1.uid = a2.uid AND a1.client_name = a2.client_name AND a1.sub = a2.sub');
$query->where('a1.aid > a2.aid');
$aids = $query->distinct()->execute()->fetchAllAssoc('aid');
if (!empty($aids)) {
......
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