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

Contents of /contributions/modules/liquid/liquid.install

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


Revision 1.1 - (show annotations) (download) (as text)
Thu Feb 8 21:02:10 2007 UTC (2 years, 9 months ago) by sorenp
Branch: MAIN
CVS Tags: DRUPAL-5--0-1, HEAD
Branch point for: DRUPAL-5
File MIME type: text/x-php
The next development version of liquid. Updated for Drupal 5.1 (new files)
1 <?php
2
3 /**
4 * Implementation of hook_install().
5 */
6 function liquid_install() {
7 switch ($GLOBALS['db_type']) {
8 case 'mysql':
9 case 'mysqli':
10 db_query("CREATE TABLE {wiki_name} (
11 wid varchar(128) NOT NULL,
12 nid int(10) unsigned NOT NULL,
13 PRIMARY KEY (wid),
14 UNIQUE KEY nid (nid)
15 ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
16 db_query("CREATE TABLE {wiki_access} (
17 nid int(10) unsigned NOT NULL default '0',
18 gid int(10) unsigned NOT NULL default '0',
19 realm varchar(255) NOT NULL default '',
20 grant_wiki_manage tinyint(1) unsigned NOT NULL default '0',
21 grant_wiki_move tinyint(1) unsigned NOT NULL default '0',
22 PRIMARY KEY (nid,gid,realm)
23 ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
24 break;
25 case 'pgsql':
26 break;
27 }
28 }
29
30 /**
31 * Implementation of hook_uninstall().
32 */
33 function liquid_uninstall() {
34 db_query('DROP TABLE {wiki_name}');
35 db_query('DROP TABLE {wiki_access}');
36 }

  ViewVC Help
Powered by ViewVC 1.1.2