-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.0.21-community-nt /*!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' */; -- -- Create schema code_assist -- CREATE DATABASE /*!32312 IF NOT EXISTS*/ code_assist; USE code_assist; -- -- Table structure for table `code_assist`.`application` -- DROP TABLE IF EXISTS `application`; CREATE TABLE `application` ( `application_id` bigint(20) unsigned NOT NULL auto_increment, `application` varchar(32) NOT NULL default '', `caption` varchar(32) NOT NULL default '', PRIMARY KEY (`application_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`application` -- -- -- Table structure for table `code_assist`.`event_severity` -- DROP TABLE IF EXISTS `event_severity`; CREATE TABLE `event_severity` ( `event_severity_id` bigint(20) unsigned NOT NULL auto_increment, `event_severity` varchar(16) NOT NULL, PRIMARY KEY (`event_severity_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`event_severity` -- -- -- Table structure for table `code_assist`.`event_type` -- DROP TABLE IF EXISTS `event_type`; CREATE TABLE `event_type` ( `event_type_id` bigint(20) unsigned NOT NULL auto_increment, `event_type` varchar(16) NOT NULL, PRIMARY KEY (`event_type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`event_type` -- -- -- Table structure for table `code_assist`.`find_replace` -- DROP TABLE IF EXISTS `find_replace`; CREATE TABLE `find_replace` ( `find_replace_id` bigint(20) unsigned NOT NULL auto_increment, `group_name` varchar(16) NOT NULL default '', `is_enabled` tinyint(1) NOT NULL default '0', `replace_type_id` bigint(20) unsigned NOT NULL default '0', `order_by` int(10) unsigned default NULL, PRIMARY KEY (`find_replace_id`), UNIQUE KEY `Index_2` (`group_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`find_replace` -- -- -- Table structure for table `code_assist`.`find_replace_context` -- DROP TABLE IF EXISTS `find_replace_context`; CREATE TABLE `find_replace_context` ( `find_replace_context_id` bigint(20) unsigned NOT NULL auto_increment, `find_replace_id` bigint(20) unsigned NOT NULL default '0', `application_id` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`find_replace_context_id`), UNIQUE KEY `Index_4` (`find_replace_id`,`application_id`), KEY `FK_find_replace_context_1` (`application_id`), CONSTRAINT `FK_find_replace_context_1` FOREIGN KEY (`application_id`) REFERENCES `application` (`application_id`), CONSTRAINT `FK_find_replace_context_2` FOREIGN KEY (`find_replace_id`) REFERENCES `find_replace` (`find_replace_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`find_replace_context` -- -- -- Table structure for table `code_assist`.`find_replace_term` -- DROP TABLE IF EXISTS `find_replace_term`; CREATE TABLE `find_replace_term` ( `find_replace_term_id` bigint(20) unsigned NOT NULL auto_increment, `find_replace_id` bigint(20) unsigned NOT NULL default '0', `find` varchar(64) NOT NULL default '', `replace` text NOT NULL, `order_by` int(10) unsigned default NULL, PRIMARY KEY (`find_replace_term_id`), KEY `FK_find_replace_term_1` (`find_replace_id`), CONSTRAINT `FK_find_replace_term_1` FOREIGN KEY (`find_replace_id`) REFERENCES `find_replace` (`find_replace_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`find_replace_term` -- -- -- Table structure for table `code_assist`.`log` -- DROP TABLE IF EXISTS `log`; CREATE TABLE `log` ( `log_id` bigint(20) unsigned NOT NULL auto_increment, `event_severity_id` bigint(20) unsigned NOT NULL, `event_type_id` bigint(20) unsigned NOT NULL, `timestamp` datetime NOT NULL, PRIMARY KEY (`log_id`), KEY `timestamp_IX` (`timestamp`), KEY `FK_log_1` (`event_severity_id`), KEY `FK_log_2` (`event_type_id`), CONSTRAINT `FK_log_1` FOREIGN KEY (`event_severity_id`) REFERENCES `event_severity` (`event_severity_id`), CONSTRAINT `FK_log_2` FOREIGN KEY (`event_type_id`) REFERENCES `event_type` (`event_type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`log` -- -- -- Table structure for table `code_assist`.`log_application_data` -- DROP TABLE IF EXISTS `log_application_data`; CREATE TABLE `log_application_data` ( `log_id` bigint(20) unsigned NOT NULL, `context` varchar(128) default NULL, `context_id` bigint(20) unsigned default NULL, `message` varchar(4096) NOT NULL, PRIMARY KEY (`log_id`), KEY `context_IX` (`context`(16)), KEY `message_IX` (`message`(16)), CONSTRAINT `FK_log_id` FOREIGN KEY (`log_id`) REFERENCES `log` (`log_id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='InnoDB free: 407552 kB; (`log_id`) REFER `feed_engine/log`(`'; -- -- Dumping data for table `code_assist`.`log_application_data` -- -- -- Table structure for table `code_assist`.`replace_type` -- DROP TABLE IF EXISTS `replace_type`; CREATE TABLE `replace_type` ( `replace_type_id` bigint(20) unsigned NOT NULL auto_increment, `replace_type` varchar(16) NOT NULL default '', PRIMARY KEY (`replace_type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`replace_type` -- -- -- Table structure for table `code_assist`.`tme_log` -- DROP TABLE IF EXISTS `tme_log`; CREATE TABLE `tme_log` ( `tme_log_id` bigint(20) unsigned NOT NULL auto_increment, `logged_at` datetime NOT NULL default '0000-00-00 00:00:00', `tme_project_id` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`tme_log_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`tme_log` -- /*!40000 ALTER TABLE `tme_log` DISABLE KEYS */; /*!40000 ALTER TABLE `tme_log` ENABLE KEYS */; -- -- Table structure for table `code_assist`.`tme_log_action` -- DROP TABLE IF EXISTS `tme_log_action`; CREATE TABLE `tme_log_action` ( `tme_log_action_id` bigint(20) unsigned NOT NULL auto_increment, `tme_log_id` bigint(20) unsigned NOT NULL default '0', `tme_log_session_id` bigint(20) unsigned NOT NULL default '0', `file` varchar(256) NOT NULL default '', `action` varchar(16) NOT NULL default '', `file_size` bigint(20) unsigned default NULL COMMENT 'size of file in bytes', PRIMARY KEY (`tme_log_action_id`), KEY `tme_log_id_FK` (`tme_log_id`), CONSTRAINT `tme_log_id_FK` FOREIGN KEY (`tme_log_id`) REFERENCES `tme_log` (`tme_log_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`tme_log_action` -- -- -- Table structure for table `code_assist`.`tme_log_comment` -- DROP TABLE IF EXISTS `tme_log_comment`; CREATE TABLE `tme_log_comment` ( `tme_log_id` bigint(20) unsigned NOT NULL default '0', `total_minutes` int(11) NOT NULL default '0', `comment` varchar(1024) NOT NULL default '', KEY `tme_log_id_FK2` (`tme_log_id`), CONSTRAINT `tme_log_id_FK2` FOREIGN KEY (`tme_log_id`) REFERENCES `tme_log` (`tme_log_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`tme_log_comment` -- -- -- Table structure for table `code_assist`.`tme_log_session` -- DROP TABLE IF EXISTS `tme_log_session`; CREATE TABLE `tme_log_session` ( `tme_log_session_id` bigint(20) unsigned NOT NULL auto_increment, `tme_log_id` bigint(20) unsigned NOT NULL default '0', `started_at` datetime NOT NULL default '0000-00-00 00:00:00', `stopped_at` datetime default NULL, PRIMARY KEY (`tme_log_session_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`tme_log_session` -- -- -- Table structure for table `code_assist`.`tme_project` -- DROP TABLE IF EXISTS `tme_project`; CREATE TABLE `tme_project` ( `tme_project_id` bigint(20) unsigned NOT NULL auto_increment, `tme_project` varchar(16) NOT NULL default '', PRIMARY KEY (`tme_project_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`tme_project` -- -- -- Table structure for table `code_assist`.`tme_statistics` -- DROP TABLE IF EXISTS `tme_statistics`; CREATE TABLE `tme_statistics` ( `tme_statistics_id` bigint(20) unsigned NOT NULL auto_increment, `tme_project_id` bigint(20) unsigned NOT NULL default '0', `file` varchar(256) NOT NULL default '', `file_time_delta` int(10) unsigned NOT NULL default '0' COMMENT 'minutes', `file_bytes_delta` int(10) unsigned NOT NULL default '0' COMMENT 'bytes', `project_delta` float NOT NULL default '0' COMMENT 'percentage', PRIMARY KEY (`tme_statistics_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `code_assist`.`tme_statistics` -- -- -- Procedure `code_assist`.`ClearAppLog` -- DROP PROCEDURE IF EXISTS `ClearAppLog`; DELIMITER $$ CREATE DEFINER=`root`@`%` PROCEDURE `ClearAppLog`() BEGIN TRUNCATE TABLE `code_assist`.`log_application_data`; TRUNCATE TABLE `code_assist`.`log`; END $$ DELIMITER ; -- -- Procedure `code_assist`.`ClearProjectLog` -- DROP PROCEDURE IF EXISTS `ClearProjectLog`; DELIMITER $$ CREATE DEFINER=`root`@`%` PROCEDURE `ClearProjectLog`() BEGIN TRUNCATE TABLE `code_assist`.`tme_log_action`; TRUNCATE TABLE `code_assist`.`tme_log_session`; TRUNCATE TABLE `code_assist`.`tme_log_comment`; TRUNCATE TABLE `code_assist`.`tme_log`; END $$ DELIMITER ; /*!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 */;