Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / redirect / modules / redirect_404 / redirect_404.install
1 <?php
2
3 /**
4  * @file
5  * Update hooks for the redirect_404 module.
6  */
7
8 use Drupal\Core\Language\LanguageInterface;
9 use Drupal\redirect_404\SqlRedirectNotFoundStorage;
10
11 /**
12  * Implements hook_schema().
13  */
14 function redirect_404_schema() {
15   $schema['redirect_404'] = [
16     'description' => 'Stores 404 requests.',
17     'fields' => [
18       'path' => [
19         'description' => 'The path of the request.',
20         'type' => 'varchar',
21         'length' => SqlRedirectNotFoundStorage::MAX_PATH_LENGTH,
22         'not null' => TRUE,
23       ],
24       'langcode' => [
25         'description' => 'The language of this request.',
26         'type' => 'varchar_ascii',
27         'length' => 12,
28         'not null' => TRUE,
29         'default' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
30       ],
31       'count' => [
32         'description' => 'The number of requests with that path and language.',
33         'type' => 'int',
34         'unsigned' => TRUE,
35         'not null' => TRUE,
36         'default' => 0,
37       ],
38       'timestamp' => [
39         'description' => 'The timestamp of the last request with that path and language.',
40         'type' => 'int',
41         'unsigned' => TRUE,
42         'not null' => TRUE,
43         'default' => 0,
44       ],
45       'resolved' => [
46         'description' => 'Boolean indicating whether or not this path has a redirect assigned.',
47         'type' => 'int',
48         'not null' => TRUE,
49         'default' => 0,
50       ],
51     ],
52     'primary key' => ['path', 'langcode'],
53   ];
54   return $schema;
55 }
56
57 /**
58  * Remove relevancy field from the redirect_404 table.
59  */
60 function redirect_404_update_8101() {
61   \Drupal::database()->schema()->dropField('redirect_404', 'relevancy');
62 }