forked from OS2web/os2web_cp_service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathos2web_cp_service.install
executable file
·67 lines (63 loc) · 2.13 KB
/
os2web_cp_service.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
<?php
/**
* @file
* Implements install hooks
*/
/**
* Imlpements hook_install().
*/
function os2web_cp_service_install() {
// Quick way to have default approved rules.
// $approved_rules = array('Byggesager', 'Emnesager', 'Postliste');
// $rules_vocabulary = taxonomy_vocabulary_machine_name_load('os2web_cp_service_tax_approved_rules');
// foreach ($approved_rules as $name) {
// $term = new stdClass();
// $term->vid = $rules_vocabulary->vid;
// $term->name = $name;
// taxonomy_term_save($term);
// }
}
function os2web_cp_service_schema() {
$schema['os2web_cp_service_documents_conversion'] = array(
'description' => 'This table is used as schedule for PDF -> HTML convertion of CP Documents',
'fields' => array(
'file_id' => array(
'description' => 'The ID of the document file located remotely',
'type' => 'varchar',
'length' => 1024,
'serialize' => TRUE,
),
'case_nid' => array(
'description' => 'The nid of the CP Case, which metadata field should be updated with file content',
'type' => 'int',
'unsigned' => TRUE,
),
'filepath_pdf' => array(
'description' => 'The path of the downloaded PDF',
'type' => 'varchar',
'length' => 1024,
'serialize' => TRUE,
),
'filepath_html' => array(
'description' => 'The path of the created HTML output',
'type' => 'varchar',
'length' => 1024,
'serialize' => TRUE,
),
'status' => array(
'description' => 'The information about the job',
'type' => 'varchar',
'length' => 1024,
'serialize' => TRUE,
),
),
'primary key' => array('case_nid'),
);
return $schema;
}
/**
* Update method installing the module's database without a need to uninstall/install it.
*/
function os2web_cp_service_update_7100(){
drupal_install_schema('os2web_cp_service');
}