Skip to content

Commit

Permalink
Add sorts, for sanity.
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-vessey committed Nov 25, 2024
1 parent 48d93c8 commit fb1e857
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Drush/Commands/Sec873DrushCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function getCurrent(array $options = []) : void {
foreach ($this->getTargetTables() as $info) {
$target_field = "{$info['field_name']}_target_id";
$query = $this->getQuery($info['table_name'], $target_field);
$ids_alias = $query->addExpression("STRING_AGG(t.entity_id::varchar, ',')", "entity_ids");
$ids_alias = $query->addExpression("STRING_AGG(t.entity_id::varchar, ',' ORDER BY t.entity_id ASC)", "entity_ids");
$id_count_alias = $query->getMetaData(static::COUNT_META);
$results = $query->execute();
foreach ($results as $result) {
Expand Down Expand Up @@ -247,7 +247,7 @@ public function getRevisions(array $options = []) : void {
$existence_query->where("[t].{$target_field} = [tt].{$target_field} AND [t].entity_id != [tt].entity_id");
$query->exists($existence_query);

$ids_alias = $query->addExpression("STRING_AGG(t.entity_id::text || ':'::text || t.revision_id::text, ',')", "entity_ids");
$ids_alias = $query->addExpression("STRING_AGG(t.entity_id::text || ':'::text || t.revision_id::text, ',' ORDER BY t.entity_id ASC, t.revision_id ASC)", "entity_ids");
$id_count_alias = $query->getMetaData(static::COUNT_META);
$results = $query->execute();
foreach ($results as $result) {
Expand Down

0 comments on commit fb1e857

Please # to comment.