Commit dcf8bb0e authored by catch's avatar catch

Issue #2704821 by alexpott: url_alias table should be created by system install

parent a2380a70
......@@ -2,6 +2,7 @@
namespace Drupal\system\Tests\Path;
use Drupal\Core\Database\Database;
use Drupal\simpletest\WebTestBase;
use Drupal\taxonomy\Entity\Term;
......@@ -23,6 +24,9 @@ class UrlAlterFunctionalTest extends WebTestBase {
* Test that URL altering works and that it occurs in the correct order.
function testUrlAlter() {
// Ensure that the url_alias table exists after Drupal installation.
$this->assertTrue(Database::getConnection()->schema()->tableExists('url_alias'), 'The url_alias table exists after Drupal installation.');
$account = $this->drupalCreateUser(array('administer url aliases'));
......@@ -7,6 +7,7 @@
use Drupal\Component\Utility\Crypt;
use Drupal\Component\Utility\Environment;
use Drupal\Core\Path\AliasStorage;
use Drupal\Core\Url;
use Drupal\Core\Database\Database;
use Drupal\Core\DrupalKernel;
......@@ -982,6 +983,11 @@ function system_schema() {
// Create the url_alias table. The alias_storage service can auto-create its
// table, but this relies on exceptions being thrown. These exceptions will be
// thrown every request until an alias is created.
$schema['url_alias'] = AliasStorage::schemaDefinition();
return $schema;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment