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

Contents of /contributions/modules/flickrhood/flickrhood.install

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


Revision 1.8 - (show annotations) (download) (as text)
Thu Oct 26 04:27:35 2006 UTC (3 years, 1 month ago) by andrewlevine
Branch: MAIN
CVS Tags: DRUPAL-5--1-0, HEAD
Branch point for: DRUPAL-5
Changes since 1.7: +0 -0 lines
File MIME type: text/x-php
fixing flickrhood.install keyword
1 <?php
2 // $Id$
3
4 /* Implementation of hook_install */
5 function flickrhood_install() {
6 switch ($GLOBALS['db_type']) {
7 case 'mysql':
8 case 'mysqli':
9 db_query('CREATE TABLE {flickrhood_users} (
10 `uid` INT( 10 ) UNSIGNED NOT NULL ,
11 `fid` VARCHAR( 64 ) ,
12 `mail` VARCHAR( 64 ) ,
13 `username` VARCHAR( 64 ) ,
14 PRIMARY KEY ( `uid` )
15 );');
16 db_query('CREATE TABLE {flickrhood_tags} (
17 `tag_id` INT UNSIGNED NOT NULL ,
18 `tag` VARCHAR( 64 ) NOT NULL ,
19 PRIMARY KEY ( `tag_id` ) ,
20 UNIQUE (
21 `tag`
22 )
23 ) TYPE = MYISAM ;');
24 db_query('CREATE TABLE {flickrhood_users_tags} (
25 `uid` INT UNSIGNED NOT NULL ,
26 `tag_id` INT UNSIGNED NOT NULL
27 );');
28
29 break;
30 }
31 }
32
33 function flickrhood_uninstall() {
34 db_query('DROP TABLE {flickrhood_users}');
35 db_query('DROP TABLE {flickrhood_tags}');
36 db_query('DROP TABLE {flickrhood_users_tags}');
37
38 variable_del('flickrhood_photos_per_page');
39 variable_del('flickrhood_apik');
40 variable_del('flickrhood_tags_in_cloud');
41 variable_del('flickrhood_updateinterval');
42 }
43
44 ?>

  ViewVC Help
Powered by ViewVC 1.1.2