5 * Update hooks for the redirect_404 module.
8 use Drupal\Core\Language\LanguageInterface;
9 use Drupal\redirect_404\SqlRedirectNotFoundStorage;
12 * Implements hook_schema().
14 function redirect_404_schema() {
15 $schema['redirect_404'] = [
16 'description' => 'Stores 404 requests.',
19 'description' => 'The path of the request.',
21 'length' => SqlRedirectNotFoundStorage::MAX_PATH_LENGTH,
25 'description' => 'The language of this request.',
26 'type' => 'varchar_ascii',
29 'default' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
32 'description' => 'The number of requests with that path and language.',
39 'description' => 'The timestamp of the last request with that path and language.',
46 'description' => 'Boolean indicating whether or not this path has a redirect assigned.',
52 'primary key' => ['path', 'langcode'],
58 * Remove relevancy field from the redirect_404 table.
60 function redirect_404_update_8101() {
61 \Drupal::database()->schema()->dropField('redirect_404', 'relevancy');