-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphylogram_datatransfer.install
executable file
·75 lines (71 loc) · 1.89 KB
/
phylogram_datatransfer.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
<?php
/**
* Created by PhpStorm.
* User: phylogram – Philip Röggla
* Date: 21.03.18
* Time: 13:39
*/
/**
* Imlements hook_schema()
*/
function phylogram_datatransfer_schema() {
$schema = [];
/**
* @var $schema ['phylogram_datatransfer_export_time'] array Stores successful data transfers
*/
$schema['phylogram_datatransfer_export_time'] = [
'description' => 'Stores successful data-export',
'fields' => [
'id' => [
'description' => 'id',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'topic' => [
'description' => 'the topic of the data',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => 'unknown',
],
'access' => [
'description' => 'the last time data was successfully exported',
'type' => 'int',
'unsigned' => TRUE,
],
],
'unique keys' => ['id' => ['id'],],
'primary key' => ['id'],
];
/**
* @var $schema ['phylogram_datatransfer_blacklist'] array A blacklist of e-mail-addresses not to transfer
*/
$schema['phylogram_datatransfer_blacklist'] = [ # To Do: Question: E-Mail-address, name?
'description' => 'Stores e-mail addresses that should not be stored',
# To Do: Store what should not be stored?!
'fields' => [
'id' => [
'description' => 'id',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'email_address' => [
'description' => 'e-mail-address to be excluded',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'created' => [
'description' => 'creation time of entry',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
],
'unique keys' => ['id' => ['id'],],
'primary key' => ['id'],
];
return $schema;
}