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

Contents of /contributions/modules/adaptive_context/adaptive_context.install

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


Revision 1.1 - (show annotations) (download) (as text)
Tue Sep 18 14:24:05 2007 UTC (2 years, 2 months ago) by mixel
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
Initial 2, now with somthing in it I hope.
1 <?php
2
3 function adaptive_context_install() {
4 switch ($GLOBALS['db_type']) {
5 case 'mysqli':
6 case 'mysql':
7 db_query("CREATE TABLE if not exists {ac_group} (
8 gid int(10) unsigned NOT NULL auto_increment,
9 gtype char(16) NOT NULL,
10 name char(128) NOT NULL,
11 PRIMARY KEY (gid)
12 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
13 db_query("CREATE TABLE if not exists {ac_class} (
14 cid int(10) unsigned NOT NULL auto_increment,
15 ctype char(16) NOT NULL,
16 PRIMARY KEY (cid)
17 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
18 db_query("CREATE TABLE if not exists {ac_part} (
19 pid int(10) unsigned NOT NULL auto_increment,
20 ptype char(16) NOT NULL,
21 gid int(10) unsigned NOT NULL,
22 cid int(10) unsigned NOT NULL,
23 PRIMARY KEY (pid)
24 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
25 }
26 }
27
28 function adaptive_context_uninstall() {
29 db_query('DROP TABLE {ac_group}');
30 db_query('DROP TABLE {ac_class}');
31 db_query('DROP TABLE {ac_part}');
32 }
33
34 ?>

  ViewVC Help
Powered by ViewVC 1.1.2