/[drupal]/contributions/modules/lastfmsimple/lastfmsimple.install
ViewVC logotype

Contents of /contributions/modules/lastfmsimple/lastfmsimple.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Apr 16 16:08:05 2008 UTC (19 months, 1 week ago) by dietrich
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, HEAD
Branch point for: DRUPAL-6--1, DRUPAL-6--2, DRUPAL-6--3
File MIME type: text/x-php
Initial commit.
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Last.fm Simple Stats module installation file.
7 *
8 * @ingroup lastfmsimple
9 */
10
11 /**
12 * Implementation of hook_install().
13 */
14 function lastfmsimple_install() {
15 drupal_install_schema('lastfmsimple');
16 drupal_set_message(t('Last.fm Simple Stats has been installed.'));
17 }
18
19 /**
20 * Implementation of hook_uninstall().
21 */
22 function lastfmsimple_uninstall() {
23 drupal_uninstall_schema('lastfmsimple');
24 variable_del('lastfmsimple_interval');
25 variable_del('lastfmsimple_update_method');
26 }
27
28 /**
29 * Implementation of hook_schema().
30 */
31 function lastfmsimple_schema() {
32 return array(
33 'lastfmsimple_feed' => array(
34 'fields' => array(
35 'fid' => array(
36 'type' => 'serial',
37 'not null' => TRUE,
38 ),
39 'user' => array(
40 'type' => 'varchar',
41 'length' => 255,
42 'not null' => TRUE,
43 'default' => '',
44 ),
45 'feed_type' => array(
46 'type' => 'varchar',
47 'length' => 30,
48 'not null' => TRUE,
49 'default' => '',
50 ),
51 'updated' => array(
52 'type' => 'int',
53 'not null' => TRUE,
54 'default' => 0,
55 ),
56 'modified' => array(
57 'type' => 'int',
58 'not null' => TRUE,
59 'default' => 0,
60 ),
61 'expires' => array(
62 'type' => 'int',
63 'not null' => TRUE,
64 'default' => 0,
65 ),
66 'current_count' => array(
67 'type' => 'int',
68 'not null' => TRUE,
69 'default' => 0,
70 ),
71 'max_count' => array(
72 'type' => 'int',
73 'not null' => TRUE,
74 'default' => 0,
75 ),
76 'fetches' => array(
77 'type' => 'int',
78 'not null' => TRUE,
79 'default' => 0,
80 ),
81 'updates' => array(
82 'type' => 'int',
83 'not null' => TRUE,
84 'default' => 0,
85 ),
86 ),
87 'primary key' => array('fid'),
88 'unique keys' => array(
89 'user_type' => array('user', 'feed_type'),
90 ),
91 'indexes' => array(
92 'feed_updated' => array('updated'),
93 'feed_expires' => array('expires'),
94 ),
95 ),
96 'lastfmsimple_item' => array(
97 'fields' => array(
98 'iid' => array(
99 'type' => 'serial',
100 'not null' => TRUE,
101 ),
102 'fid' => array(
103 'type' => 'int',
104 'not null' => TRUE,
105 'default' => 0,
106 ),
107 'name' => array(
108 'type' => 'varchar',
109 'length' => 255,
110 'not null' => TRUE,
111 'default' => '',
112 ),
113 'url' => array(
114 'type' => 'varchar',
115 'length' => 255,
116 'not null' => TRUE,
117 'default' => '',
118 ),
119 'item_data' => array(
120 'type' => 'text',
121 'not null' => FALSE,
122 ),
123 ),
124 'primary key' => array('iid'),
125 'indexes' => array(
126 'item_fid' => array('fid'),
127 ),
128 ),
129 );
130 }

  ViewVC Help
Powered by ViewVC 1.1.2