Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / draggableviews / draggableviews.install
1 <?php
2
3 /**
4  * @file
5  * Install, update and uninstall functions for the draggableviews module.
6  */
7
8 use Drupal\views\Views;
9
10 /**
11  * Implements hook_schema().
12  */
13 function draggableviews_schema() {
14   $schema['draggableviews_structure'] = [
15     'description' => 'Saves the order settings of a draggableview view.',
16     'fields' => [
17       'dvid' => [
18         'type' => 'serial',
19         'unsigned' => TRUE,
20         'not null' => TRUE,
21         'description' => 'The primary identifier.',
22       ],
23       'view_name' => [
24         'type' => 'varchar',
25         'length' => 128,
26         'not null' => TRUE,
27         'default' => '',
28         'description' => 'Makes the order unique for each view.',
29       ],
30       'view_display' => [
31         'type' => 'varchar',
32         'length' => 64,
33         'not null' => TRUE,
34         'default' => '',
35         'description' => 'Makes the order unique for each view display.',
36       ],
37       'args' => [
38         'type' => 'varchar',
39         'length' => 255,
40         'not null' => FALSE,
41         'default' => '',
42         'description' => 'Makes the order unique for a given set of arguments',
43       ],
44       'entity_id' => [
45         'type' => 'int',
46         'unsigned' => TRUE,
47         'not null' => TRUE,
48         'description' => 'Id of the entity that we are sorting (node, user, etc.).',
49       ],
50       'weight' => [
51         'type' => 'int',
52         'unsigned' => FALSE,
53         'not null' => TRUE,
54         'default' => 0,
55         'description' => 'The order weight.',
56       ],
57       'parent' => [
58         'type' => 'int',
59         'unsigned' => FALSE,
60         'not null' => TRUE,
61         'default' => 0,
62         'description' => 'The id of the parent.',
63       ],
64     ],
65     'indexes' => [
66       'view' => ['view_name', 'view_display', 'args', 'entity_id'],
67       'weight' => ['weight'],
68       'entity_id' => ['entity_id'],
69     ],
70     'primary key' => ['dvid'],
71   ];
72
73   return $schema;
74 }
75
76 /**
77  * Implements hook_update().
78  */
79 function draggableviews_update_8104(&$sandbox) {
80   // the update hook here accidentally cropped in into 1.1 but it shouldn't be
81   // there, I belivee that removing it should be harmless.
82 }