Issue #2843358 by alexpott, mallezie, dawehner: Postgres fail in Drupal\Tests\path\Kernel\Migrate\d6\MigrateUrlAliasTest

8.3.x
Nathaniel Catchpole 2017-01-17 11:08:07 +00:00
parent 054a7a644e
commit 05b64e0748
1 changed files with 5 additions and 1 deletions

View File

@ -13,7 +13,11 @@ abstract class UrlAliasBase extends DrupalSqlBase {
* {@inheritdoc}
*/
public function query() {
return $this->select('url_alias', 'ua')->fields('ua');
// The order of the migration is significant since
// \Drupal\Core\Path\AliasStorage::lookupPathAlias() orders by pid before
// returning a result. Postgres does not automatically order by primary key
// therefore we need to add a specific order by.
return $this->select('url_alias', 'ua')->fields('ua')->orderBy('pid');
}
/**