-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqualtricsxm.install
52 lines (47 loc) · 1.1 KB
/
qualtricsxm.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
<?php
/**
* @file
* Module installation.
*/
/**
* Implements hook_schema_alter().
*/
function qualtricsxm_schema_alter(&$schema) {
$schema['block_custom']['fields']['extra'] = array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
);
}
/**
* Implements hook_install().
*/
function qualtricsxm_install() {
$schema = array();
// It's OK to reference the schema in a hook_install.
qualtricsxm_schema_alter($schema);
$definition = $schema['block_custom']['fields']['extra'];
db_add_field('block_custom', 'extra', $definition);
}
/**
* Implements hook_update().
*/
function qualtricsxm_update_7101() {
// It's not OK to reference the schema in an update function,
// updates must be protected from future changes.
$definition = array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
);
db_add_field('block_custom', 'extra', $definition);
}
/**
* Implements hook_uninstall().
*/
function qualtricsxm_uninstall() {
// Don't forget to clean up after yourself.
db_drop_field('block_custom', 'extra');
}