-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version	5.0.77


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;

--
-- CAS V3.3.5.1 Audit and Statistics
--

--
-- Create schema SharedCasAudit
--

CREATE DATABASE IF NOT EXISTS SharedCasAudit;
USE SharedCasAudit;

--
-- Definition of table `COM_AUDIT_TRAIL`
--

DROP TABLE IF EXISTS `COM_AUDIT_TRAIL`;
CREATE TABLE `COM_AUDIT_TRAIL` (
  `AUD_USER` varchar(100) NOT NULL,
  `AUD_CLIENT_IP` varchar(100) NOT NULL,
  `AUD_SERVER_IP` varchar(100) NOT NULL,
  `AUD_RESOURCE` varchar(100) NOT NULL,
  `AUD_ACTION` varchar(100) NOT NULL,
  `APPLIC_CD` varchar(5) NOT NULL,
  `AUD_DATE` timestamp NOT NULL,
  PRIMARY KEY  (`AUD_USER`,`AUD_CLIENT_IP`,`AUD_SERVER_IP`,`AUD_RESOURCE`,`AUD_ACTION`,`APPLIC_CD`,`AUD_DATE`),
  KEY `COM_AUDIT_TRAIL_DATE_I` (`AUD_DATE`),
  KEY `COM_AUDIT_TRAIL_CLIENT_DATE_I` (`AUD_CLIENT_IP`,`AUD_DATE`),
  KEY `COM_AUDIT_TRAIL_USER_DATE_I` (`AUD_USER`,`AUD_DATE`),
  KEY `COM_AUDIT_TRAIL_ACTION_DATE_I` (`AUD_ACTION`,`AUD_DATE`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Definition of table `COM_STATISTICS`
--

DROP TABLE IF EXISTS `COM_STATISTICS`;
CREATE TABLE `COM_STATISTICS` (
  `STAT_SERVER_IP` varchar(100) NOT NULL,
  `STAT_DATE` timestamp NOT NULL,
  `APPLIC_CD` varchar(5) NOT NULL,
  `STAT_PRECISION` varchar(6) NOT NULL,
  `STAT_COUNT` mediumtext NOT NULL,
  `STAT_NAME` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`STAT_SERVER_IP`,`STAT_DATE`,`APPLIC_CD`,`STAT_PRECISION`,`STAT_NAME`),
  KEY `COM_STATISTICS_DATE_I` (`STAT_DATE`),
  KEY `COM_STATISTICS_NAME_DATE_I` (`STAT_NAME`,`STAT_DATE`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;