PostgreSQL schema for mx_sitestats v1.3.1
 
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    phpMiX.org Forum Index -> mxBB Modules -> mxBB Module: mx_sitestats
View previous topic :: View next topic  
Author Message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sat Apr 02, 2005 3:29 pm    Post subject: PostgreSQL schema for mx_sitestats v1.3.1 Reply with quote

Before installing the module, please apply the following changes:

OPEN: modules/mx_sitestats/db_install.php

FIND:
Code:
//
// Table: SiteStats Counter Table
//
"DROP TABLE IF EXISTS ".SITESTATS_COUNTER_TABLE,
"CREATE TABLE ".SITESTATS_COUNTER_TABLE." (
   id            INT(11)         DEFAULT '0'      NOT NULL,
   page         VARCHAR(255)   DEFAULT ''      NOT NULL,
   hits_counter   INT(11)         DEFAULT '0'      NOT NULL,
   sess_counter   INT(11)         DEFAULT '0'      NOT NULL,
   PRIMARY KEY (id),
   KEY page (page)
)",
//
// Table: SiteStats HTTP Referers Table
//
"DROP TABLE IF EXISTS ".SITESTATS_REFERER_TABLE,
"CREATE TABLE ".SITESTATS_REFERER_TABLE." (
   id            INT(11)         DEFAULT '0'      NOT NULL auto_increment,
   host         VARCHAR(255)   DEFAULT ''      NOT NULL,
   hits         INT(11)         DEFAULT '0'      NOT NULL,
   firstvisit      INT(11)         DEFAULT '0'      NOT NULL,
   lastvisit      INT(11)         DEFAULT '0'      NOT NULL,
   enabled         TINYINT(1)      DEFAULT '0'      NOT NULL,
   PRIMARY KEY (id),
   KEY hits (enabled DESC, hits DESC, lastvisit ASC)
)",
//
// Table: SiteStats Settings Table
//
"DROP TABLE IF EXISTS ".SITESTATS_CONFIG_TABLE,
"CREATE TABLE ".SITESTATS_CONFIG_TABLE." (
   config_name      VARCHAR(255)   DEFAULT ''      NOT NULL,
   config_value   VARCHAR(255)   DEFAULT ''      NOT NULL,
   PRIMARY KEY (config_name)
)",


REPLACE WITH:
Code:
//
// Table: SiteStats Counter Table
//
"DROP TABLE ".SITESTATS_COUNTER_TABLE,
"CREATE TABLE ".SITESTATS_COUNTER_TABLE." (
   id            INT         DEFAULT '0'      NOT NULL,
   page         VARCHAR(255)   DEFAULT ''      NOT NULL,
   hits_counter   INT         DEFAULT '0'      NOT NULL,
   sess_counter   INT         DEFAULT '0'      NOT NULL,
   CONSTRAINT ".SITESTATS_COUNTER_TABLE."_pkey PRIMARY KEY (id)
)",
"CREATE INDEX ".SITESTATS_COUNTER_TABLE."_page_idx ON ".SITESTATS_COUNTER_TABLE." (page)",
//
// Table: SiteStats HTTP Referers Table
//
"DROP TABLE ".SITESTATS_REFERER_TABLE,
"CREATE TABLE ".SITESTATS_REFERER_TABLE." (
   id            SERIAL,
   host         VARCHAR(255)   DEFAULT ''      NOT NULL,
   hits         INT         DEFAULT '0'      NOT NULL,
   firstvisit      INT         DEFAULT '0'      NOT NULL,
   lastvisit      INT         DEFAULT '0'      NOT NULL,
   enabled         SMALLINT      DEFAULT '0'      NOT NULL,
   CONSTRAINT ".SITESTATS_REFERER_TABLE."_pkey PRIMARY KEY (id)
)",
"CREATE INDEX ".SITESTATS_REFERER_TABLE."_hits_idx ON ".SITESTATS_REFERER_TABLE." (enabled DESC, hits DESC, lastvisit ASC)",
//
// Table: SiteStats Settings Table
//
"DROP TABLE ".SITESTATS_CONFIG_TABLE,
"CREATE TABLE ".SITESTATS_CONFIG_TABLE." (
   config_name      VARCHAR(255)   DEFAULT ''      NOT NULL,
   config_value   VARCHAR(255)   DEFAULT ''      NOT NULL,
   CONSTRAINT ".SITESTATS_CONFIG_TABLE."_pkey PRIMARY KEY (config_name)
)",

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    phpMiX.org Forum Index -> mxBB Modules -> mxBB Module: mx_sitestats All times are GMT + 1 Hour
 
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum