/[drupal]/contributions/sandbox/alex_b/feedapi_mapper/feedapi_mapper.install
ViewVC logotype

Contents of /contributions/sandbox/alex_b/feedapi_mapper/feedapi_mapper.install

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


Revision 1.2 - (show annotations) (download) (as text)
Sun Nov 11 22:05:36 2007 UTC (2 years ago) by alexb
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
File MIME type: text/x-php
 line
1 <?php
2 // $Id: $
3
4 /**
5 * Implementaton of hook_install().
6 */
7 function feedapi_mapper_install() {
8 switch ($GLOBALS['db_type']) {
9 case 'mysqli':
10 case 'mysql':
11 db_query("CREATE TABLE {feedapi_mapper} (
12 `nid` INT( 10 ) UNSIGNED NOT NULL ,
13 `mapping` LONGTEXT NOT NULL ,
14 PRIMARY KEY ( `nid` )
15 )");
16 break;
17 case 'pgsql':
18 // Todo.
19 break;
20 }
21 }
22
23 /**
24 * Implementaton of hook_uninstall().
25 */
26 function feedapi_mapper_uninstall() {
27 switch ($GLOBALS['db_type']) {
28 case 'mysqli':
29 case 'mysql':
30 case 'pgsql':
31 db_query("DROP TABLE {feedapi_mapper}");
32 break;
33 }
34 }

  ViewVC Help
Powered by ViewVC 1.1.2