-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvideo_annotator.install
106 lines (101 loc) · 3.12 KB
/
video_annotator.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
<?php
/**
* @file
* Install, update, and uninstall functions for the video_annotator plugin
*/
/**
* Implements hook_uninstall().
*
* @ingroup video_annotator
*/
function video_annotator_uninstall() {
drupal_uninstall_schema('video_annotator');
}
function video_annotator_install() {
drupal_install_schema('video_annotator');
}
function video_annotator_schema() {
return array(
'video_annotations' => array(
'description' => 'Storage for video annotations.',
'indexes' => array(
'scope' => array('scope'),
),
'unique_keys' => array(
),
'primary key' => array('id'),
'fields' => array(
'id' => array(
'description' => 'The primary identifier for the annotation',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'uid' => array(
'description' => t('The user who created the annotation.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'created' => array(
'description' => t('The timestamp for when the annotation was created.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'modified' => array(
'description' => t('The timetamp for when the annotation was modified.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'body_type' => array(
'description' => t('The mime type of the annotation body'),
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => 'text/plain',
),
'text_body' => array(
'description' => t('The text body of the annotation.'),
'type' => 'text',
),
'svg_selector' => array(
'description' => t('The SVG description of the region the annotation is targeting.'),
'type' => 'text',
),
'height' => array(
'description' => t('The height of the play surface at the time the annotation was made.'),
'type' => 'int',
'unsigned' => TRUE,
),
'width' => array(
'description' => t('The width of the play surface at the time the annotation was made.'),
'type' => 'int',
'unsigned' => TRUE,
),
'start_time' => array(
'description' => t('The time in the video at which the annotation becomes applicable.'),
'type' => 'float',
),
'end_time' => array(
'description' => t('The time in the video at which the annotation is no longer applicable.'),
'type' => 'float',
),
'target' => array(
'description' => t('The URL of the embedded video which this annotation targets.'),
'type' => 'text',
),
'scope' => array(
'description' => t('The node which embeds the video when this annotation is applicable.'),
'type' => 'int',
'not null' => TRUE,
),
),
),
);
}
?>