-
Notifications
You must be signed in to change notification settings - Fork 1
/
hosting_solr.install
92 lines (87 loc) · 1.9 KB
/
hosting_solr.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
/**
* @file
* Install, update and uninstall for the database server module.
*/
/**
* Implementation of hook_schema().
*/
function hosting_solr_schema() {
$schema['hosting_solr_server'] = array(
'fields' => array(
'vid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'solr_url' => array(
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'solr_port' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 8080
),
'solr_path' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => 'service.php',
),
'solr_enabled' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array('vid'),
);
$schema['hosting_solr_sites'] = array(
'fields' => array(
'vid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'hosting_solr_server' => array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
),
),
'indexes' => array(
'vid' => array('vid'),
'hosting_solr_server' => array('hosting_solr_server'),
),
);
return $schema;
}
/**
* Implementation of hook_install().
*/
function hosting_solr_install() {
// Create tables.
drupal_install_schema('hosting_solr');
}
/**
* Implementation of hook_uninstall().
*/
function hosting_solr_uninstall() {
// Create tables.
drupal_uninstall_schema('hosting_solr');
}