function system_update_11201
Add the [alias] field to the {router} table.
File
-
core/
modules/ system/ system.install, line 1767
Code
function system_update_11201() : void {
$schema = \Drupal::database()->schema();
if ($schema->tableExists('router') && !$schema->fieldExists('router', 'alias')) {
$spec = [
'fields' => [
'alias' => [
'description' => 'The alias of the route, if applicable.',
'type' => 'varchar_ascii',
'length' => 255,
],
],
];
$schema->addField('router', 'alias', $spec['fields']['alias']);
$schema->addIndex('router', 'alias', [
'alias',
], $spec);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.