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

Contents of /contributions/modules/ua_logger/ua_logger.install

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


Revision 1.2 - (show annotations) (download) (as text)
Sun Jul 8 04:19:53 2007 UTC (2 years, 4 months ago) by daryl
Branch: MAIN
CVS Tags: DRUPAL-5--1-2, HEAD
Branch point for: DRUPAL-6--1
Changes since 1.1: +15 -6 lines
File MIME type: text/x-php
applying patch submitted at http://drupal.org/node/157624
1 <?php
2
3 /**
4 * Implementation of hook_install().
5 */
6 function ua_logger_install() {
7 switch ($GLOBALS['db_type']) {
8 case 'pgsql':
9 db_query("CREATE TABLE {ua_logger} (
10 id SERIAL,
11 xid integer default NULL,
12 type text not null default null check (type in ('node', 'comment')) ,
13 ua text default NULL,
14 PRIMARY KEY (id)
15 )");
16 break;
17 case 'mysql':
18 case 'mysqli':
19 db_query("CREATE TABLE {ua_logger} (
20 id int(10) unsigned zerofill NOT NULL auto_increment,
21 xid int(10) unsigned zerofill default NULL,
22 type enum('node','comment') default NULL,
23 ua char(150) default NULL,
24 PRIMARY KEY (id)
25 ) ENGINE=MyISAM DEFAULT CHARSET=latin1");
26 break;
27 }
28 }
29
30 ?>

  ViewVC Help
Powered by ViewVC 1.1.2