Newer
Older
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
<?php
// $Id$
/**
* @file
*/
/**
* Implementation of hook_schema().
*/
function feeds_schema() {
$schema['feeds_configuration'] = array(
'description' => 'Configuration of feeds objects.',
'export' => array(
'key' => 'name',
'identifier' => 'feed_object',
'default hook' => 'feeds', // Function hook name.
'api' => array(
'owner' => 'data',
'api' => 'feeds_default', // Base name for api include files.
'minimum_version' => 1,
'current_version' => 1,
),
),
'fields' => array(
'id' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
'description' => 'Id of the fields object.',
),
'class' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
'description' => 'Class name of the feeds object.',
),
'config' => array(
'type' => 'text',
'not null' => FALSE,
'description' => 'Configuration of the feeds object.',
'serialize' => TRUE,
),
),
'indexes' => array(
'id' => array('id'),
'class' => array('class'),
),
);
return $schema;
}
/**
* Implementation of hook_install().
*/
function feeds_install() {
// Create tables.
drupal_install_schema('feeds');
}
/**
* Implementation of hook_uninstall().
*/
function feeds_uninstall() {
// Remove tables.
drupal_uninstall_schema('feeds');
}