-
Notifications
You must be signed in to change notification settings - Fork 0
/
exact_target_api.install
52 lines (45 loc) · 1.32 KB
/
exact_target_api.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
* Install, update and uninstall functions for the ExactTarget API module.
*/
// Include our constants
require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'exact_target_api') . '/exact_target_api.module';
/**
* Implements hook_schema().
*/
function exact_target_api_schema() {
$schema = array();
// Define mapping storage for each webform
$schema[ET_TABLE_LIST_CACHE] = array(
'description' => 'Table containing cached info for ET subscription lists',
'fields' => array(
ET_COL_LISTID => array(
'description' => 'ET Subscription list ID',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
ET_COL_LIST_NAME => array(
'description' => 'ET Subscription list name',
'type' => 'varchar',
'length' => 255,
),
ET_COL_LIST_TYPE => array(
'description' => 'ET Subscription list type',
'type' => 'varchar',
'length' => 255,
),
), // fields
'primary key' => array(ET_COL_LISTID),
);
return $schema;
}
/**
* Update the config variable to store a non-serialized version.
*/
function exact_target_api_update_7000() {
if ($config = variable_get(ET_CFG_VAR)) {
variable_set(ET_CFG_VAR, unserialize($config));
}
}