This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pbs_tv_schedule.install
69 lines (64 loc) · 1.62 KB
/
pbs_tv_schedule.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
<?php
/**
* @file
* Install, update, and uninstall functions for the PBS TV Schedule module.
*/
/**
* Implements hook_schema().
*/
function pbs_tv_schedule_schema() {
$schema = array();
$schema['pbs_tv_schedule_program'] = array(
'description' => 'Cache of static programs list from the TVSS API.',
'fields' => array(
'cid' => array(
'description' => 'TVSS entry ID.',
'type' => 'char',
'length' => '36',
'not null' => TRUE,
),
'program_id' => array(
'description' => 'TVSS program ID.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'title' => array(
'description' => 'Program title.',
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
),
'description' => array(
'description' => 'Program description.',
'type' => 'text',
'not null' => FALSE,
),
'external_id' => array(
'description' => 'TVVS external ID.',
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
),
'rovi' => array(
'description' => 'TVSS ROVI ID (deprecated).',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array('cid'),
'unique keys' => array(
'program_id' => array('program_id'),
),
);
return $schema;
}
/**
* Implements hook_install().
*/
function pbs_tv_schedule_install() {
// Get a full list of program from the TVSS API (does not require auth).
_pbs_tv_schedule_programs_update();
}