forked from SU-SWS/stanford_subsites
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stanford_subsites.install
60 lines (56 loc) · 1.41 KB
/
stanford_subsites.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
* Implements hook_install().
*/
function stanford_subsites_install() {
// Because it is bundled in the feature we have to enable it.
variable_set('stanford_subsite_content_types', array('page'));
}
/**
* Implements hook_schema().
*/
function stanford_subsites_schema() {
$schema['subsite_index'] = array(
'description' => 'Keeps track of subsite related things',
'fields' => array(
'nid' => array(
'description' => 'Subsite nid',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'tid' => array(
'description' => 'Subsite term id',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'menu' => array(
'description' => 'Subsite menu name',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'context' => array(
'description' => 'context machine name',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
),
'indexes' => array(
'ntm' => array('nid', "tid", "menu"),
'nt' => array('nid', "tid"),
'nm' => array('nid', "menu"),
'tm' => array("tid", "menu"),
),
'unique keys' => array(
'tid' => array('tid'),
'menu' => array('menu'),
),
'primary key' => array('nid'),
);
return $schema;
}