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

Contents of /contributions/modules/promise/promise.install

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


Revision 1.2 - (show annotations) (download) (as text)
Fri Feb 16 02:39:50 2007 UTC (2 years, 9 months ago) by kreynen
Branch: MAIN
CVS Tags: DRUPAL-5--1-0, HEAD
Branch point for: DRUPAL-5
Changes since 1.1: +20 -4 lines
File MIME type: text/x-php
applied patch #113985
1 <?php
2 // $Id: promise.install,v 1.1 2007/01/28 23:17:08 kreynen Exp $
3
4 /**
5 * Implementation of hook_install().
6 */
7 function promise_install() {
8 switch ($GLOBALS['db_type']) {
9 case 'mysql':
10 db_query("CREATE TABLE {promise} (
11 nid int(10) unsigned NOT NULL default '0',
12 duedate int(11) unsigned NOT NULL default '0',
13 quota int(10) unsigned NOT NULL default '0',
14 PRIMARY KEY (nid)
15 ) /*!40100 DEFAULT CHARACTER SET utf8 */;"
16 );
17 db_query("CREATE TABLE {promise_signed} (
18 id int(11) unsigned NOT NULL default '0',
19 nid int(11) unsigned NOT NULL default '0',
20 uid int(11) unsigned NOT NULL default '0',
21 signed int(11) unsigned NOT NULL default '0',
22 PRIMARY KEY (id)
23 )/*!40100 DEFAULT CHARACTER SET utf8 AUTO_INCREMENT=2 */;"
24 );
25 break;
26 case 'mysqli':
27 db_query("CREATE TABLE {promise} (
28 nid int(10) unsigned NOT NULL default '0',
29 duedate int(11) unsigned NOT NULL default '0',
30 quota int(10) unsigned NOT NULL default '0',
31 PRIMARY KEY (nid)
32 ) /*!40100 DEFAULT CHARACTER SET utf8 */;"
33 );
34 db_query("CREATE TABLE {promise_signed} (
35 id int(11) unsigned NOT NULL default '0',
36 nid int(11) unsigned NOT NULL default '0',
37 uid int(11) unsigned NOT NULL default '0',
38 signed int(11) unsigned NOT NULL default '0',
39 PRIMARY KEY (id)
40 )/*!40100 DEFAULT CHARACTER SET utf8 AUTO_INCREMENT=2 */;"
41 );
42 break;
43 case 'pgsql':
44 break;
45 }
46 }
47
48 /**
49 * Implementation of hook_uninstall().
50 */
51 function promise_uninstall() {
52 db_query('DROP TABLE {promise, promise_signed}');
53 }

  ViewVC Help
Powered by ViewVC 1.1.2