Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions tide_core.install
Original file line number Diff line number Diff line change
Expand Up @@ -1219,3 +1219,25 @@ function tide_core_update_10031() {
}
$approver_role->save();
}

/**
* Drupal 11 introduced the new field, but it causes errors in drush updb,
* we need to alter table beforehand to avoid these issues.
*/
function tide_core_update_10032(): 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);
}
}
Loading