-
Notifications
You must be signed in to change notification settings - Fork 0
/
provider.install
108 lines (103 loc) · 2.74 KB
/
provider.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
/**
* @file
* Database migration for providers.
*/
/**
* Implements hook_schema().
*/
function provider_schema() {
$schema['provider'] = array(
'description' => 'The base table for providers.',
'fields' => array(
'pid' => array(
'description' => 'The primary identifier for a provider.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'vid' => array(
'description' => 'The current {provider_revision}.vid version identifier.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'type' => array(
'description' => 'The {provider_type} of this provider.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => 'The title of this provider.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'created' => array(
'description' => 'The Unix timestamp when the provider was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'changed' => array(
'description' => 'The Unix timestamp when the provider was most recently saved.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'unique keys' => array(
'pid_vid' => array('pid', 'vid'),
'pid' => array('pid'),
),
'primary key' => array('pid'),
);
$schema['provider_revision'] = array(
'description' => 'Stores information about each saved version of an {provider}.',
'fields' => array(
'pid' => array(
'description' => 'The {provider} this version belongs to.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'vid' => array(
'description' => 'The primary identifier for this version.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'title' => array(
'description' => 'The title of this version.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'created' => array(
'description' => 'The Unix timestamp when the provider was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'pid' => array('pid'),
),
'primary key' => array('vid'),
'foreign keys' => array(
'provider' => array(
'table' => 'provider',
'columns' => array(
'pid' => 'pid',
),
),
),
);
return $schema;
}