From 25eb48621d4d26d932648a0cdb6a1410ccdb7808 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 16 Jul 2015 18:37:42 +0300 Subject: [PATCH] DB syncronization and related files update --- call_interface2.php | 4 +- database/quexs.sql | 1416 ++++++++++++++--------------------- nocaseavailable.php | 2 +- waitnextcase_interface2.php | 4 +- 4 files changed, 581 insertions(+), 845 deletions(-) diff --git a/call_interface2.php b/call_interface2.php index a1066d94..95588070 100644 --- a/call_interface2.php +++ b/call_interface2.php @@ -123,7 +123,7 @@ function display_outcomes($contacted,$ca,$case_id) $sql = "SELECT outcome_id,description,contacted FROM outcome WHERE contacted = '$contacted' - AND outcome_id NOT IN(5,10,19,21,40,41,33,34)"; + AND outcome_id NOT IN(5,10,19,21,40,41,34,35)"; } } else @@ -133,7 +133,7 @@ function display_outcomes($contacted,$ca,$case_id) $sql = "SELECT outcome_id,description,contacted FROM outcome WHERE contacted = '$contacted' - AND outcome_id NOT IN(5,10,19,21,40,41,33,34)"; + AND outcome_id NOT IN(5,10,19,21,40,41,34,35)"; } } } diff --git a/database/quexs.sql b/database/quexs.sql index b04bed29..93872d4a 100644 --- a/database/quexs.sql +++ b/database/quexs.sql @@ -1,13 +1,14 @@ -- phpMyAdmin SQL Dump --- version 2.11.8.1deb5+lenny9 +-- version 3.5.7 -- http://www.phpmyadmin.net -- -- Host: localhost --- Generation Time: Feb 28, 2013 at 09:35 AM --- Server version: 5.0.51 --- PHP Version: 5.2.6-1+lenny16 +-- Generation Time: Jul 10, 2015 at 08:47 +-- Server version: 5.1.73 +-- PHP Version: 5.3.28 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; @@ -16,7 +17,7 @@ SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET NAMES utf8 */; -- --- Database: `quexs_ictest` +-- Database: `quexs_alex` -- -- -------------------------------------------------------- @@ -26,25 +27,23 @@ SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- CREATE TABLE `appointment` ( - `appointment_id` bigint(20) NOT NULL auto_increment, + `appointment_id` bigint(20) NOT NULL AUTO_INCREMENT, `case_id` bigint(20) NOT NULL, `contact_phone_id` bigint(20) NOT NULL, `call_attempt_id` bigint(20) NOT NULL, `start` datetime NOT NULL, `end` datetime NOT NULL, - `require_operator_id` bigint(20) default NULL, + `require_operator_id` bigint(20) DEFAULT NULL, `respondent_id` bigint(20) NOT NULL, - `completed_call_id` bigint(20) default NULL, - PRIMARY KEY (`appointment_id`), + `completed_call_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`appointment_id`), KEY `completed_call_id` (`completed_call_id`), KEY `call_attempt_id` (`call_attempt_id`), - KEY `case_id` (`case_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `appointment` --- - + KEY `case_id` (`case_id`), + KEY `contact_phone_id` (`contact_phone_id`), + KEY `respondent_id` (`respondent_id`), + KEY `require_operator_id` (`require_operator_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -53,13 +52,14 @@ CREATE TABLE `appointment` ( -- CREATE TABLE `availability` ( - `availability_id` bigint(20) NOT NULL auto_increment, + `availability_id` bigint(20) NOT NULL AUTO_INCREMENT, `availability_group_id` bigint(20) NOT NULL, `start` time NOT NULL, `end` time NOT NULL, `day_of_week` tinyint(1) NOT NULL, - PRIMARY KEY (`availability_id`), - KEY `availability_group_id` (`availability_group_id`) + PRIMARY KEY (`availability_id`), + KEY `availability_group_id` (`availability_group_id`), + KEY `day_of_week` (`day_of_week`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -90,9 +90,9 @@ INSERT INTO `availability` (`availability_id`, `availability_group_id`, `start`, -- CREATE TABLE `availability_group` ( - `availability_group_id` bigint(20) NOT NULL auto_increment, - `description` text collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`availability_group_id`) + `availability_group_id` bigint(20) NOT NULL AUTO_INCREMENT, + `description` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`availability_group_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -111,28 +111,28 @@ INSERT INTO `availability_group` (`availability_group_id`, `description`) VALUES -- CREATE TABLE `call` ( - `call_id` bigint(20) NOT NULL auto_increment, + `call_id` bigint(20) NOT NULL AUTO_INCREMENT, `operator_id` bigint(20) NOT NULL, `respondent_id` bigint(20) NOT NULL, `case_id` bigint(20) NOT NULL, `contact_phone_id` bigint(20) NOT NULL, `call_attempt_id` bigint(20) NOT NULL, `start` datetime NOT NULL, - `end` datetime default NULL, - `outcome_id` int(11) NOT NULL default '0', - `state` tinyint(1) NOT NULL default '0' COMMENT '0 not called, 1 requesting call, 2 ringing, 3 answered, 4 requires coding, 5 done', - PRIMARY KEY (`call_id`), + `end` datetime DEFAULT NULL, + `outcome_id` int(11) NOT NULL DEFAULT '0', + `state` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 not called, 1 requesting call, 2 ringing, 3 answered, 4 requires coding, 5 done', + PRIMARY KEY (`call_id`), KEY `operator_id` (`operator_id`), KEY `case_id` (`case_id`), KEY `call_attempt_id` (`call_attempt_id`), KEY `contact_phone_id` (`contact_phone_id`), - KEY `start` (`start`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `call` --- - + KEY `start` (`start`), + KEY `respondent_id` (`respondent_id`), + KEY `outcome_id` (`outcome_id`), + KEY `state` (`state`), + KEY `end` (`end`), + KEY `call_id` (`call_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -141,22 +141,19 @@ CREATE TABLE `call` ( -- CREATE TABLE `call_attempt` ( - `call_attempt_id` bigint(20) NOT NULL auto_increment, + `call_attempt_id` bigint(20) NOT NULL AUTO_INCREMENT, `case_id` bigint(20) NOT NULL, `operator_id` bigint(20) NOT NULL, `respondent_id` bigint(20) NOT NULL, `start` datetime NOT NULL, - `end` datetime default NULL, - PRIMARY KEY (`call_attempt_id`), + `end` datetime DEFAULT NULL, + PRIMARY KEY (`call_attempt_id`), KEY `case_id` (`case_id`), KEY `end` (`end`), - KEY `respondent_id` (`respondent_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `call_attempt` --- - + KEY `respondent_id` (`respondent_id`), + KEY `operator_id` (`operator_id`), + KEY `start` (`start`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -165,20 +162,16 @@ CREATE TABLE `call_attempt` ( -- CREATE TABLE `call_note` ( - `call_note_id` bigint(20) NOT NULL auto_increment, + `call_note_id` bigint(20) NOT NULL AUTO_INCREMENT, `call_id` bigint(20) NOT NULL, `operator_id` bigint(20) NOT NULL, - `note` text collate utf8_unicode_ci NOT NULL, + `note` text COLLATE utf8_unicode_ci NOT NULL, `datetime` datetime NOT NULL, - PRIMARY KEY (`call_note_id`), - KEY `call_id` (`call_id`) + PRIMARY KEY (`call_note_id`), + KEY `call_id` (`call_id`), + KEY `operator_id` (`operator_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `call_note` --- - - -- -------------------------------------------------------- -- @@ -212,8 +205,8 @@ INSERT INTO `call_restrict` (`day_of_week`, `start`, `end`) VALUES(7, '09:00:00' CREATE TABLE `call_state` ( `call_state_id` tinyint(1) NOT NULL, - `description` varchar(255) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`call_state_id`) + `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`call_state_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -234,30 +227,27 @@ INSERT INTO `call_state` (`call_state_id`, `description`) VALUES(5, 'Done'); -- CREATE TABLE `case` ( - `case_id` bigint(20) NOT NULL auto_increment, + `case_id` bigint(20) NOT NULL AUTO_INCREMENT, `sample_id` bigint(20) NOT NULL, `questionnaire_id` bigint(20) NOT NULL, - `last_call_id` bigint(20) default NULL, - `current_operator_id` bigint(20) default NULL, - `current_call_id` bigint(20) default NULL, - `current_outcome_id` int(11) NOT NULL default '1', - `sortorder` int(11) default NULL, - `token` varchar(36) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`case_id`), + `last_call_id` bigint(20) DEFAULT NULL, + `current_operator_id` bigint(20) DEFAULT NULL, + `current_call_id` bigint(20) DEFAULT NULL, + `current_outcome_id` int(11) NOT NULL DEFAULT '1', + `sortorder` int(11) DEFAULT NULL, + `token` varchar(36) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`case_id`), UNIQUE KEY `onecasepersample` (`sample_id`,`questionnaire_id`), + UNIQUE KEY `case_id` (`case_id`), UNIQUE KEY `token` (`token`), UNIQUE KEY `current_operator_id` (`current_operator_id`), UNIQUE KEY `current_call_id` (`current_call_id`), KEY `sample_id` (`sample_id`), KEY `questionnaire_id` (`questionnaire_id`), + KEY `current_outcome_id` (`current_outcome_id`), KEY `sortorder` (`sortorder`), KEY `last_call_id` (`last_call_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `case` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -268,14 +258,9 @@ CREATE TABLE `case` ( CREATE TABLE `case_availability` ( `case_id` bigint(20) NOT NULL, `availability_group_id` bigint(20) NOT NULL, - PRIMARY KEY (`case_id`,`availability_group_id`) + PRIMARY KEY (`case_id`,`availability_group_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `case_availability` --- - - -- -------------------------------------------------------- -- @@ -283,26 +268,28 @@ CREATE TABLE `case_availability` ( -- CREATE TABLE `case_note` ( - `case_note_id` bigint(20) NOT NULL auto_increment, + `case_note_id` bigint(20) NOT NULL AUTO_INCREMENT, `case_id` bigint(20) NOT NULL, `operator_id` bigint(20) NOT NULL, - `note` text collate utf8_unicode_ci NOT NULL, + `note` text COLLATE utf8_unicode_ci NOT NULL, `datetime` datetime NOT NULL, - PRIMARY KEY (`case_note_id`), + PRIMARY KEY (`case_note_id`), KEY `case_id` (`case_id`), KEY `operator_id` (`operator_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- -- -- Table structure for table `case_queue` -- CREATE TABLE `case_queue` ( - `case_queue_id` bigint(20) NOT NULL auto_increment, + `case_queue_id` bigint(20) NOT NULL AUTO_INCREMENT, `case_id` bigint(20) NOT NULL, `operator_id` bigint(20) NOT NULL, `sortorder` int(11) NOT NULL, - PRIMARY KEY (`case_queue_id`), + PRIMARY KEY (`case_queue_id`), UNIQUE KEY `case_id` (`case_id`), KEY `operator_id` (`operator_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -314,19 +301,14 @@ CREATE TABLE `case_queue` ( -- CREATE TABLE `client` ( - `client_id` bigint(20) NOT NULL auto_increment, - `username` varchar(255) collate utf8_unicode_ci NOT NULL, - `firstName` varchar(255) collate utf8_unicode_ci NOT NULL, - `lastName` varchar(255) collate utf8_unicode_ci NOT NULL, - `Time_zone_name` char(64) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`client_id`), + `client_id` bigint(20) NOT NULL AUTO_INCREMENT, + `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `firstName` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `lastName` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `Time_zone_name` char(64) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`client_id`), UNIQUE KEY `username` (`username`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `client` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -337,14 +319,9 @@ CREATE TABLE `client` ( CREATE TABLE `client_questionnaire` ( `client_id` bigint(20) NOT NULL, `questionnaire_id` bigint(20) NOT NULL, - PRIMARY KEY (`client_id`,`questionnaire_id`) + PRIMARY KEY (`client_id`,`questionnaire_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `client_questionnaire` --- - - -- -------------------------------------------------------- -- @@ -352,19 +329,15 @@ CREATE TABLE `client_questionnaire` ( -- CREATE TABLE `contact_phone` ( - `contact_phone_id` bigint(20) NOT NULL auto_increment, + `contact_phone_id` bigint(20) NOT NULL AUTO_INCREMENT, `case_id` bigint(20) NOT NULL, - `priority` tinyint(1) NOT NULL default '1', - `phone` char(30) collate utf8_unicode_ci NOT NULL, - `description` varchar(255) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`contact_phone_id`), - KEY `case_id` (`case_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `contact_phone` --- - + `priority` tinyint(1) NOT NULL DEFAULT '1', + `phone` char(30) COLLATE utf8_unicode_ci NOT NULL, + `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`contact_phone_id`), + KEY `case_id` (`case_id`), + KEY `contact_phone_id` (`contact_phone_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -374,7 +347,7 @@ CREATE TABLE `contact_phone` ( CREATE TABLE `day_of_week` ( `day_of_week` tinyint(1) NOT NULL, - PRIMARY KEY (`day_of_week`) + PRIMARY KEY (`day_of_week`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -395,7 +368,7 @@ INSERT INTO `day_of_week` (`day_of_week`) VALUES(7); -- Table structure for table `extension` -- -CREATE TABLE IF NOT EXISTS `extension` ( +CREATE TABLE `extension` ( `extension_id` int(11) NOT NULL AUTO_INCREMENT, `extension` char(10) COLLATE utf8_unicode_ci NOT NULL, `password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -404,7 +377,7 @@ CREATE TABLE IF NOT EXISTS `extension` ( PRIMARY KEY (`extension_id`), UNIQUE KEY `extension` (`extension`), UNIQUE KEY `current_operator_id` (`current_operator_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -413,22 +386,17 @@ CREATE TABLE IF NOT EXISTS `extension` ( -- CREATE TABLE `lime_answers` ( - `qid` int(11) NOT NULL default '0', - `code` varchar(5) collate utf8_unicode_ci NOT NULL default '', - `answer` text collate utf8_unicode_ci NOT NULL, - `assessment_value` int(11) NOT NULL default '0', + `qid` int(11) NOT NULL DEFAULT '0', + `code` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `answer` text COLLATE utf8_unicode_ci NOT NULL, + `assessment_value` int(11) NOT NULL DEFAULT '0', `sortorder` int(11) NOT NULL, - `language` varchar(20) collate utf8_unicode_ci NOT NULL default 'en', - `scale_id` tinyint(4) NOT NULL default '0', - PRIMARY KEY (`qid`,`code`,`language`,`scale_id`), + `language` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'en', + `scale_id` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`qid`,`code`,`language`,`scale_id`), KEY `answers_idx2` (`sortorder`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_answers` --- - - -- -------------------------------------------------------- -- @@ -436,25 +404,20 @@ CREATE TABLE `lime_answers` ( -- CREATE TABLE `lime_assessments` ( - `id` int(11) NOT NULL auto_increment, - `sid` int(11) NOT NULL default '0', - `scope` varchar(5) collate utf8_unicode_ci NOT NULL default '', - `gid` int(11) NOT NULL default '0', - `name` text collate utf8_unicode_ci NOT NULL, - `minimum` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `maximum` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `message` text collate utf8_unicode_ci NOT NULL, - `language` varchar(20) collate utf8_unicode_ci NOT NULL default 'en', - PRIMARY KEY (`id`,`language`), + `id` int(11) NOT NULL AUTO_INCREMENT, + `sid` int(11) NOT NULL DEFAULT '0', + `scope` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `gid` int(11) NOT NULL DEFAULT '0', + `name` text COLLATE utf8_unicode_ci NOT NULL, + `minimum` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `maximum` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `message` text COLLATE utf8_unicode_ci NOT NULL, + `language` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'en', + PRIMARY KEY (`id`,`language`), KEY `assessments_idx2` (`sid`), KEY `assessments_idx3` (`gid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_assessments` --- - - -- -------------------------------------------------------- -- @@ -462,22 +425,17 @@ CREATE TABLE `lime_assessments` ( -- CREATE TABLE `lime_conditions` ( - `cid` int(11) NOT NULL auto_increment, - `qid` int(11) NOT NULL default '0', - `scenario` int(11) NOT NULL default '1', - `cqid` int(11) NOT NULL default '0', - `cfieldname` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `method` char(5) collate utf8_unicode_ci NOT NULL default '', - `value` varchar(255) collate utf8_unicode_ci NOT NULL default '', - PRIMARY KEY (`cid`), + `cid` int(11) NOT NULL AUTO_INCREMENT, + `qid` int(11) NOT NULL DEFAULT '0', + `scenario` int(11) NOT NULL DEFAULT '1', + `cqid` int(11) NOT NULL DEFAULT '0', + `cfieldname` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `method` char(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + PRIMARY KEY (`cid`), KEY `conditions_idx2` (`qid`), KEY `conditions_idx3` (`cqid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `lime_conditions` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -486,20 +444,15 @@ CREATE TABLE `lime_conditions` ( -- CREATE TABLE `lime_defaultvalues` ( - `qid` int(11) NOT NULL default '0', - `specialtype` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `scale_id` int(11) NOT NULL default '0', - `sqid` int(11) NOT NULL default '0', - `language` varchar(20) collate utf8_unicode_ci NOT NULL, - `defaultvalue` text collate utf8_unicode_ci, - PRIMARY KEY (`qid`,`scale_id`,`language`,`specialtype`,`sqid`) + `qid` int(11) NOT NULL DEFAULT '0', + `specialtype` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `scale_id` int(11) NOT NULL DEFAULT '0', + `sqid` int(11) NOT NULL DEFAULT '0', + `language` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `defaultvalue` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`qid`,`scale_id`,`language`,`specialtype`,`sqid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_defaultvalues` --- - - -- -------------------------------------------------------- -- @@ -507,24 +460,19 @@ CREATE TABLE `lime_defaultvalues` ( -- CREATE TABLE `lime_expression_errors` ( - `id` int(9) NOT NULL auto_increment, - `errortime` varchar(50) collate utf8_unicode_ci default NULL, - `sid` int(11) default NULL, - `gid` int(11) default NULL, - `qid` int(11) default NULL, - `gseq` int(11) default NULL, - `qseq` int(11) default NULL, - `type` varchar(50) collate utf8_unicode_ci default NULL, - `eqn` text collate utf8_unicode_ci, - `prettyprint` text collate utf8_unicode_ci, - PRIMARY KEY (`id`) + `id` int(9) NOT NULL AUTO_INCREMENT, + `errortime` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `sid` int(11) DEFAULT NULL, + `gid` int(11) DEFAULT NULL, + `qid` int(11) DEFAULT NULL, + `gseq` int(11) DEFAULT NULL, + `qseq` int(11) DEFAULT NULL, + `type` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `eqn` text COLLATE utf8_unicode_ci, + `prettyprint` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_expression_errors` --- - - -- -------------------------------------------------------- -- @@ -532,18 +480,13 @@ CREATE TABLE `lime_expression_errors` ( -- CREATE TABLE `lime_failed_login_attempts` ( - `id` int(11) NOT NULL auto_increment, - `ip` varchar(37) collate utf8_unicode_ci NOT NULL, - `last_attempt` varchar(20) collate utf8_unicode_ci NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `ip` varchar(37) COLLATE utf8_unicode_ci NOT NULL, + `last_attempt` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `number_attempts` int(11) NOT NULL, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_failed_login_attempts` --- - - -- -------------------------------------------------------- -- @@ -551,22 +494,17 @@ CREATE TABLE `lime_failed_login_attempts` ( -- CREATE TABLE `lime_groups` ( - `gid` int(11) NOT NULL auto_increment, - `sid` int(11) NOT NULL default '0', - `group_name` varchar(100) collate utf8_unicode_ci NOT NULL default '', - `group_order` int(11) NOT NULL default '0', - `description` text collate utf8_unicode_ci, - `language` varchar(20) collate utf8_unicode_ci NOT NULL default 'en', - `randomization_group` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `grelevance` text collate utf8_unicode_ci, - PRIMARY KEY (`gid`,`language`), + `gid` int(11) NOT NULL AUTO_INCREMENT, + `sid` int(11) NOT NULL DEFAULT '0', + `group_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `group_order` int(11) NOT NULL DEFAULT '0', + `description` text COLLATE utf8_unicode_ci, + `language` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'en', + `randomization_group` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `grelevance` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`gid`,`language`), KEY `groups_idx2` (`sid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `lime_groups` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -575,21 +513,16 @@ CREATE TABLE `lime_groups` ( -- CREATE TABLE `lime_labels` ( - `lid` int(11) NOT NULL default '0', - `code` varchar(5) collate utf8_unicode_ci NOT NULL default '', - `title` text collate utf8_unicode_ci, + `lid` int(11) NOT NULL DEFAULT '0', + `code` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `title` text COLLATE utf8_unicode_ci, `sortorder` int(11) NOT NULL, - `assessment_value` int(11) NOT NULL default '0', - `language` varchar(20) collate utf8_unicode_ci NOT NULL default 'en', - PRIMARY KEY (`lid`,`sortorder`,`language`), + `assessment_value` int(11) NOT NULL DEFAULT '0', + `language` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'en', + PRIMARY KEY (`lid`,`sortorder`,`language`), KEY `ixcode` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_labels` --- - - -- -------------------------------------------------------- -- @@ -597,17 +530,12 @@ CREATE TABLE `lime_labels` ( -- CREATE TABLE `lime_labelsets` ( - `lid` int(11) NOT NULL auto_increment, - `label_name` varchar(100) collate utf8_unicode_ci NOT NULL default '', - `languages` varchar(200) collate utf8_unicode_ci default 'en', - PRIMARY KEY (`lid`) + `lid` int(11) NOT NULL AUTO_INCREMENT, + `label_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `languages` varchar(200) COLLATE utf8_unicode_ci DEFAULT 'en', + PRIMARY KEY (`lid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_labelsets` --- - - -- -------------------------------------------------------- -- @@ -615,21 +543,16 @@ CREATE TABLE `lime_labelsets` ( -- CREATE TABLE `lime_participants` ( - `participant_id` varchar(50) collate utf8_unicode_ci NOT NULL, - `firstname` varchar(40) collate utf8_unicode_ci default NULL, - `lastname` varchar(40) collate utf8_unicode_ci default NULL, - `email` varchar(80) collate utf8_unicode_ci default NULL, - `language` varchar(40) collate utf8_unicode_ci default NULL, - `blacklisted` varchar(1) collate utf8_unicode_ci NOT NULL, + `participant_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `firstname` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL, + `lastname` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL, + `email` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL, + `language` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL, + `blacklisted` varchar(1) COLLATE utf8_unicode_ci NOT NULL, `owner_uid` int(20) NOT NULL, - PRIMARY KEY (`participant_id`) + PRIMARY KEY (`participant_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_participants` --- - - -- -------------------------------------------------------- -- @@ -637,17 +560,12 @@ CREATE TABLE `lime_participants` ( -- CREATE TABLE `lime_participant_attribute` ( - `participant_id` varchar(50) collate utf8_unicode_ci NOT NULL, + `participant_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `attribute_id` int(11) NOT NULL, - `value` varchar(50) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`participant_id`,`attribute_id`) + `value` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`participant_id`,`attribute_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_participant_attribute` --- - - -- -------------------------------------------------------- -- @@ -655,17 +573,12 @@ CREATE TABLE `lime_participant_attribute` ( -- CREATE TABLE `lime_participant_attribute_names` ( - `attribute_id` int(11) NOT NULL auto_increment, - `attribute_type` varchar(4) collate utf8_unicode_ci NOT NULL, - `visible` char(5) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`attribute_id`,`attribute_type`) + `attribute_id` int(11) NOT NULL AUTO_INCREMENT, + `attribute_type` varchar(4) COLLATE utf8_unicode_ci NOT NULL, + `visible` char(5) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`attribute_id`,`attribute_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_participant_attribute_names` --- - - -- -------------------------------------------------------- -- @@ -674,16 +587,11 @@ CREATE TABLE `lime_participant_attribute_names` ( CREATE TABLE `lime_participant_attribute_names_lang` ( `attribute_id` int(11) NOT NULL, - `attribute_name` varchar(30) collate utf8_unicode_ci NOT NULL, - `lang` varchar(20) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`attribute_id`,`lang`) + `attribute_name` varchar(30) COLLATE utf8_unicode_ci NOT NULL, + `lang` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`attribute_id`,`lang`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_participant_attribute_names_lang` --- - - -- -------------------------------------------------------- -- @@ -691,17 +599,12 @@ CREATE TABLE `lime_participant_attribute_names_lang` ( -- CREATE TABLE `lime_participant_attribute_values` ( - `value_id` int(11) NOT NULL auto_increment, + `value_id` int(11) NOT NULL AUTO_INCREMENT, `attribute_id` int(11) NOT NULL, - `value` varchar(20) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`value_id`) + `value` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`value_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_participant_attribute_values` --- - - -- -------------------------------------------------------- -- @@ -709,18 +612,13 @@ CREATE TABLE `lime_participant_attribute_values` ( -- CREATE TABLE `lime_participant_shares` ( - `participant_id` varchar(50) collate utf8_unicode_ci NOT NULL, + `participant_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `share_uid` int(11) NOT NULL, `date_added` datetime NOT NULL, - `can_edit` varchar(5) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`participant_id`,`share_uid`) + `can_edit` varchar(5) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`participant_id`,`share_uid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_participant_shares` --- - - -- -------------------------------------------------------- -- @@ -728,33 +626,28 @@ CREATE TABLE `lime_participant_shares` ( -- CREATE TABLE `lime_questions` ( - `qid` int(11) NOT NULL auto_increment, - `parent_qid` int(11) NOT NULL default '0', - `sid` int(11) NOT NULL default '0', - `gid` int(11) NOT NULL default '0', - `type` char(1) collate utf8_unicode_ci NOT NULL default 'T', - `title` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `question` text collate utf8_unicode_ci NOT NULL, - `preg` text collate utf8_unicode_ci, - `help` text collate utf8_unicode_ci, - `other` char(1) collate utf8_unicode_ci NOT NULL default 'N', - `mandatory` char(1) collate utf8_unicode_ci default NULL, + `qid` int(11) NOT NULL AUTO_INCREMENT, + `parent_qid` int(11) NOT NULL DEFAULT '0', + `sid` int(11) NOT NULL DEFAULT '0', + `gid` int(11) NOT NULL DEFAULT '0', + `type` char(1) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'T', + `title` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `question` text COLLATE utf8_unicode_ci NOT NULL, + `preg` text COLLATE utf8_unicode_ci, + `help` text COLLATE utf8_unicode_ci, + `other` char(1) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'N', + `mandatory` char(1) COLLATE utf8_unicode_ci DEFAULT NULL, `question_order` int(11) NOT NULL, - `language` varchar(20) collate utf8_unicode_ci NOT NULL default 'en', - `scale_id` tinyint(4) NOT NULL default '0', - `same_default` tinyint(4) NOT NULL default '0' COMMENT 'Saves if user set to use the same default value across languages in default options dialog', - `relevance` text collate utf8_unicode_ci, - PRIMARY KEY (`qid`,`language`), + `language` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'en', + `scale_id` tinyint(4) NOT NULL DEFAULT '0', + `same_default` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Saves if user set to use the same default value across languages in default options dialog', + `relevance` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`qid`,`language`), KEY `questions_idx2` (`sid`), KEY `questions_idx3` (`gid`), KEY `questions_idx4` (`type`), KEY `parent_qid_idx` (`parent_qid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `lime_questions` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -763,20 +656,15 @@ CREATE TABLE `lime_questions` ( -- CREATE TABLE `lime_question_attributes` ( - `qaid` int(11) NOT NULL auto_increment, - `qid` int(11) NOT NULL default '0', - `attribute` varchar(50) collate utf8_unicode_ci default NULL, - `value` text collate utf8_unicode_ci, - `language` varchar(20) collate utf8_unicode_ci default NULL, - PRIMARY KEY (`qaid`), + `qaid` int(11) NOT NULL AUTO_INCREMENT, + `qid` int(11) NOT NULL DEFAULT '0', + `attribute` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `value` text COLLATE utf8_unicode_ci, + `language` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`qaid`), KEY `question_attributes_idx2` (`qid`), KEY `question_attributes_idx3` (`attribute`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `lime_question_attributes` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -785,22 +673,17 @@ CREATE TABLE `lime_question_attributes` ( -- CREATE TABLE `lime_quota` ( - `id` int(11) NOT NULL auto_increment, - `sid` int(11) default NULL, - `name` varchar(255) collate utf8_unicode_ci default NULL, - `qlimit` int(8) default NULL, - `action` int(2) default NULL, - `active` int(1) NOT NULL default '1', - `autoload_url` int(1) NOT NULL default '0', - PRIMARY KEY (`id`), + `id` int(11) NOT NULL AUTO_INCREMENT, + `sid` int(11) DEFAULT NULL, + `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `qlimit` int(8) DEFAULT NULL, + `action` int(2) DEFAULT NULL, + `active` int(1) NOT NULL DEFAULT '1', + `autoload_url` int(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), KEY `quota_idx2` (`sid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_quota` --- - - -- -------------------------------------------------------- -- @@ -808,21 +691,16 @@ CREATE TABLE `lime_quota` ( -- CREATE TABLE `lime_quota_languagesettings` ( - `quotals_id` int(11) NOT NULL auto_increment, - `quotals_quota_id` int(11) NOT NULL default '0', - `quotals_language` varchar(45) collate utf8_unicode_ci NOT NULL default 'en', - `quotals_name` varchar(255) collate utf8_unicode_ci default NULL, - `quotals_message` text collate utf8_unicode_ci NOT NULL, - `quotals_url` varchar(255) collate utf8_unicode_ci default NULL, - `quotals_urldescrip` varchar(255) collate utf8_unicode_ci default NULL, - PRIMARY KEY (`quotals_id`) + `quotals_id` int(11) NOT NULL AUTO_INCREMENT, + `quotals_quota_id` int(11) NOT NULL DEFAULT '0', + `quotals_language` varchar(45) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'en', + `quotals_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `quotals_message` text COLLATE utf8_unicode_ci NOT NULL, + `quotals_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `quotals_urldescrip` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`quotals_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_quota_languagesettings` --- - - -- -------------------------------------------------------- -- @@ -830,20 +708,15 @@ CREATE TABLE `lime_quota_languagesettings` ( -- CREATE TABLE `lime_quota_members` ( - `id` int(11) NOT NULL auto_increment, - `sid` int(11) default NULL, - `qid` int(11) default NULL, - `quota_id` int(11) default NULL, - `code` varchar(11) collate utf8_unicode_ci default NULL, - PRIMARY KEY (`id`), + `id` int(11) NOT NULL AUTO_INCREMENT, + `sid` int(11) DEFAULT NULL, + `qid` int(11) DEFAULT NULL, + `quota_id` int(11) DEFAULT NULL, + `code` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), UNIQUE KEY `sid` (`sid`,`qid`,`quota_id`,`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_quota_members` --- - - -- -------------------------------------------------------- -- @@ -851,27 +724,22 @@ CREATE TABLE `lime_quota_members` ( -- CREATE TABLE `lime_saved_control` ( - `scid` int(11) NOT NULL auto_increment, - `sid` int(11) NOT NULL default '0', - `srid` int(11) NOT NULL default '0', + `scid` int(11) NOT NULL AUTO_INCREMENT, + `sid` int(11) NOT NULL DEFAULT '0', + `srid` int(11) NOT NULL DEFAULT '0', `identifier` bigint(20) NOT NULL, - `access_code` text collate utf8_unicode_ci NOT NULL, - `email` varchar(320) collate utf8_unicode_ci default NULL, - `ip` text collate utf8_unicode_ci NOT NULL, - `saved_thisstep` text collate utf8_unicode_ci NOT NULL, - `status` char(1) collate utf8_unicode_ci NOT NULL default '', + `access_code` text COLLATE utf8_unicode_ci NOT NULL, + `email` varchar(320) COLLATE utf8_unicode_ci DEFAULT NULL, + `ip` text COLLATE utf8_unicode_ci NOT NULL, + `saved_thisstep` text COLLATE utf8_unicode_ci NOT NULL, + `status` char(1) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `saved_date` datetime NOT NULL, - `refurl` text collate utf8_unicode_ci, - PRIMARY KEY (`scid`), + `refurl` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`scid`), KEY `saved_control_idx2` (`sid`), KEY `identifier` (`identifier`), KEY `srid` (`srid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `lime_saved_control` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -880,22 +748,17 @@ CREATE TABLE `lime_saved_control` ( -- CREATE TABLE `lime_sessions` ( - `sesskey` varchar(64) collate utf8_unicode_ci NOT NULL default '', + `sesskey` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `expiry` datetime NOT NULL, - `expireref` varchar(250) collate utf8_unicode_ci default '', + `expireref` varchar(250) COLLATE utf8_unicode_ci DEFAULT '', `created` datetime NOT NULL, `modified` datetime NOT NULL, - `sessdata` longtext collate utf8_unicode_ci, - PRIMARY KEY (`sesskey`), + `sessdata` longtext COLLATE utf8_unicode_ci, + PRIMARY KEY (`sesskey`), KEY `sess2_expiry` (`expiry`), KEY `sess2_expireref` (`expireref`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_sessions` --- - - -- -------------------------------------------------------- -- @@ -903,9 +766,9 @@ CREATE TABLE `lime_sessions` ( -- CREATE TABLE `lime_settings_global` ( - `stg_name` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `stg_value` varchar(255) collate utf8_unicode_ci NOT NULL default '', - PRIMARY KEY (`stg_name`) + `stg_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `stg_value` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + PRIMARY KEY (`stg_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -924,68 +787,63 @@ INSERT INTO `lime_settings_global` (`stg_name`, `stg_value`) VALUES('SessionName CREATE TABLE `lime_surveys` ( `sid` int(11) NOT NULL, `owner_id` int(11) NOT NULL, - `admin` varchar(50) collate utf8_unicode_ci default NULL, - `active` char(1) collate utf8_unicode_ci NOT NULL default 'N', - `expires` datetime default NULL, - `startdate` datetime default NULL, - `adminemail` varchar(320) collate utf8_unicode_ci default NULL, - `anonymized` char(1) collate utf8_unicode_ci NOT NULL default 'N', - `faxto` varchar(20) collate utf8_unicode_ci default NULL, - `format` char(1) collate utf8_unicode_ci default NULL, - `savetimings` char(1) collate utf8_unicode_ci default 'N', - `template` varchar(100) collate utf8_unicode_ci default 'default', - `language` varchar(50) collate utf8_unicode_ci default NULL, - `additional_languages` varchar(255) collate utf8_unicode_ci default NULL, - `datestamp` char(1) collate utf8_unicode_ci default 'N', - `usecookie` char(1) collate utf8_unicode_ci default 'N', - `allowregister` char(1) collate utf8_unicode_ci default 'N', - `allowsave` char(1) collate utf8_unicode_ci default 'Y', - `autonumber_start` bigint(11) default '0', - `autoredirect` char(1) collate utf8_unicode_ci default 'N', - `allowprev` char(1) collate utf8_unicode_ci default 'Y', - `printanswers` char(1) collate utf8_unicode_ci default 'N', - `ipaddr` char(1) collate utf8_unicode_ci default 'N', - `refurl` char(1) collate utf8_unicode_ci default 'N', - `datecreated` date default NULL, - `publicstatistics` char(1) collate utf8_unicode_ci default 'N', - `publicgraphs` char(1) collate utf8_unicode_ci default 'N', - `listpublic` char(1) collate utf8_unicode_ci default 'N', - `htmlemail` char(1) collate utf8_unicode_ci default 'N', - `tokenanswerspersistence` char(1) collate utf8_unicode_ci default 'N', - `assessments` char(1) collate utf8_unicode_ci default 'N', - `usecaptcha` char(1) collate utf8_unicode_ci default 'N', - `usetokens` char(1) collate utf8_unicode_ci default 'N', - `bounce_email` varchar(320) collate utf8_unicode_ci default NULL, - `attributedescriptions` text collate utf8_unicode_ci, - `emailresponseto` text collate utf8_unicode_ci, - `emailnotificationto` text collate utf8_unicode_ci, - `tokenlength` tinyint(2) default '15', - `showxquestions` char(1) collate utf8_unicode_ci default 'Y', - `showgroupinfo` char(1) collate utf8_unicode_ci default 'B', - `shownoanswer` char(1) collate utf8_unicode_ci default 'Y', - `showqnumcode` char(1) collate utf8_unicode_ci default 'X', - `bouncetime` bigint(20) default NULL, - `bounceprocessing` varchar(1) collate utf8_unicode_ci default 'N', - `bounceaccounttype` varchar(4) collate utf8_unicode_ci default NULL, - `bounceaccounthost` varchar(200) collate utf8_unicode_ci default NULL, - `bounceaccountpass` varchar(100) collate utf8_unicode_ci default NULL, - `bounceaccountencryption` varchar(3) collate utf8_unicode_ci default NULL, - `bounceaccountuser` varchar(200) collate utf8_unicode_ci default NULL, - `showwelcome` char(1) collate utf8_unicode_ci default 'Y', - `showprogress` char(1) collate utf8_unicode_ci default 'Y', - `allowjumps` char(1) collate utf8_unicode_ci default 'N', - `navigationdelay` tinyint(2) default '0', - `nokeyboard` char(1) collate utf8_unicode_ci default 'N', - `alloweditaftercompletion` char(1) collate utf8_unicode_ci default 'N', - `googleanalyticsstyle` char(1) collate utf8_unicode_ci default NULL, - `googleanalyticsapikey` varchar(25) collate utf8_unicode_ci default NULL, - PRIMARY KEY (`sid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `lime_surveys` --- - + `admin` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `active` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'N', + `expires` datetime DEFAULT NULL, + `startdate` datetime DEFAULT NULL, + `adminemail` varchar(320) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `anonymized` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'N', + `faxto` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `format` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `savetimings` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `template` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'default', + `language` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `additional_languages` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `datestamp` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `usecookie` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `allowregister` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `allowsave` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'Y', + `autonumber_start` bigint(11) DEFAULT '0', + `autoredirect` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `allowprev` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'Y', + `printanswers` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `ipaddr` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `refurl` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `datecreated` date DEFAULT NULL, + `publicstatistics` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `publicgraphs` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `listpublic` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `htmlemail` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `tokenanswerspersistence` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `assessments` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `usecaptcha` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `usetokens` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `bounce_email` varchar(320) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `attributedescriptions` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `emailresponseto` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `emailnotificationto` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `tokenlength` tinyint(2) DEFAULT '15', + `showxquestions` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'Y', + `showgroupinfo` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'B', + `shownoanswer` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'Y', + `showqnumcode` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'X', + `bouncetime` bigint(20) DEFAULT NULL, + `bounceprocessing` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `bounceaccounttype` varchar(4) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `bounceaccounthost` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `bounceaccountpass` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `bounceaccountencryption` varchar(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `bounceaccountuser` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `showwelcome` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'Y', + `showprogress` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'Y', + `allowjumps` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `navigationdelay` tinyint(2) DEFAULT '0', + `nokeyboard` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `alloweditaftercompletion` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'N', + `googleanalyticsstyle` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `googleanalyticsapikey` varchar(25) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`sid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -994,35 +852,30 @@ CREATE TABLE `lime_surveys` ( -- CREATE TABLE `lime_surveys_languagesettings` ( - `surveyls_survey_id` int(11) NOT NULL default '0', - `surveyls_language` varchar(45) collate utf8_unicode_ci NOT NULL default 'en', - `surveyls_title` varchar(200) collate utf8_unicode_ci NOT NULL, - `surveyls_description` text collate utf8_unicode_ci, - `surveyls_welcometext` text collate utf8_unicode_ci, - `surveyls_endtext` text collate utf8_unicode_ci, - `surveyls_url` varchar(255) collate utf8_unicode_ci default NULL, - `surveyls_urldescription` varchar(255) collate utf8_unicode_ci default NULL, - `surveyls_email_invite_subj` varchar(255) collate utf8_unicode_ci default NULL, - `surveyls_email_invite` text collate utf8_unicode_ci, - `surveyls_email_remind_subj` varchar(255) collate utf8_unicode_ci default NULL, - `surveyls_email_remind` text collate utf8_unicode_ci, - `surveyls_email_register_subj` varchar(255) collate utf8_unicode_ci default NULL, - `surveyls_email_register` text collate utf8_unicode_ci, - `surveyls_email_confirm_subj` varchar(255) collate utf8_unicode_ci default NULL, - `surveyls_email_confirm` text collate utf8_unicode_ci, - `surveyls_dateformat` int(10) unsigned NOT NULL default '1', - `email_admin_notification_subj` varchar(255) collate utf8_unicode_ci default NULL, - `email_admin_notification` text collate utf8_unicode_ci, - `email_admin_responses_subj` varchar(255) collate utf8_unicode_ci default NULL, - `email_admin_responses` text collate utf8_unicode_ci, - `surveyls_numberformat` int(11) NOT NULL default '0', - PRIMARY KEY (`surveyls_survey_id`,`surveyls_language`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `lime_surveys_languagesettings` --- - + `surveyls_survey_id` int(11) NOT NULL DEFAULT '0', + `surveyls_language` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'en', + `surveyls_title` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, + `surveyls_description` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `surveyls_welcometext` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `surveyls_endtext` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `surveyls_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `surveyls_urldescription` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `surveyls_email_invite_subj` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `surveyls_email_invite` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `surveyls_email_remind_subj` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `surveyls_email_remind` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `surveyls_email_register_subj` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `surveyls_email_register` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `surveyls_email_confirm_subj` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `surveyls_email_confirm` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `surveyls_dateformat` int(10) unsigned NOT NULL DEFAULT '1', + `email_admin_notification_subj` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `email_admin_notification` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `email_admin_responses_subj` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + `email_admin_responses` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `surveyls_numberformat` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`surveyls_survey_id`,`surveyls_language`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -1031,18 +884,13 @@ CREATE TABLE `lime_surveys_languagesettings` ( -- CREATE TABLE `lime_survey_links` ( - `participant_id` varchar(50) collate utf8_unicode_ci NOT NULL, + `participant_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `token_id` int(11) NOT NULL, `survey_id` int(11) NOT NULL, `date_created` datetime NOT NULL, - PRIMARY KEY (`participant_id`,`token_id`,`survey_id`) + PRIMARY KEY (`participant_id`,`token_id`,`survey_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_survey_links` --- - - -- -------------------------------------------------------- -- @@ -1052,21 +900,16 @@ CREATE TABLE `lime_survey_links` ( CREATE TABLE `lime_survey_permissions` ( `sid` int(11) NOT NULL, `uid` int(11) NOT NULL, - `permission` varchar(20) collate utf8_unicode_ci NOT NULL, - `create_p` tinyint(1) NOT NULL default '0', - `read_p` tinyint(1) NOT NULL default '0', - `update_p` tinyint(1) NOT NULL default '0', - `delete_p` tinyint(1) NOT NULL default '0', - `import_p` tinyint(1) NOT NULL default '0', - `export_p` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`sid`,`uid`,`permission`) + `permission` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `create_p` tinyint(1) NOT NULL DEFAULT '0', + `read_p` tinyint(1) NOT NULL DEFAULT '0', + `update_p` tinyint(1) NOT NULL DEFAULT '0', + `delete_p` tinyint(1) NOT NULL DEFAULT '0', + `import_p` tinyint(1) NOT NULL DEFAULT '0', + `export_p` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`sid`,`uid`,`permission`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_survey_permissions` --- - - -- -------------------------------------------------------- -- @@ -1074,16 +917,11 @@ CREATE TABLE `lime_survey_permissions` ( -- CREATE TABLE `lime_templates` ( - `folder` varchar(255) collate utf8_unicode_ci NOT NULL, + `folder` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `creator` int(11) NOT NULL, - PRIMARY KEY (`folder`) + PRIMARY KEY (`folder`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_templates` --- - - -- -------------------------------------------------------- -- @@ -1092,16 +930,11 @@ CREATE TABLE `lime_templates` ( CREATE TABLE `lime_templates_rights` ( `uid` int(11) NOT NULL, - `folder` varchar(255) collate utf8_unicode_ci NOT NULL, + `folder` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `use` int(1) NOT NULL, - PRIMARY KEY (`uid`,`folder`) + PRIMARY KEY (`uid`,`folder`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_templates_rights` --- - - -- -------------------------------------------------------- -- @@ -1109,27 +942,27 @@ CREATE TABLE `lime_templates_rights` ( -- CREATE TABLE `lime_users` ( - `uid` int(11) NOT NULL auto_increment, - `users_name` varchar(64) collate utf8_unicode_ci NOT NULL default '', + `uid` int(11) NOT NULL AUTO_INCREMENT, + `users_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `password` blob NOT NULL, - `full_name` varchar(50) collate utf8_unicode_ci NOT NULL, + `full_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `parent_id` int(11) NOT NULL, - `lang` varchar(20) collate utf8_unicode_ci default NULL, - `email` varchar(320) collate utf8_unicode_ci default NULL, - `create_survey` tinyint(1) NOT NULL default '0', - `create_user` tinyint(1) NOT NULL default '0', - `participant_panel` tinyint(1) NOT NULL default '0', - `delete_user` tinyint(1) NOT NULL default '0', - `superadmin` tinyint(1) NOT NULL default '0', - `configurator` tinyint(1) NOT NULL default '0', - `manage_template` tinyint(1) NOT NULL default '0', - `manage_label` tinyint(1) NOT NULL default '0', - `htmleditormode` varchar(7) collate utf8_unicode_ci default 'default', - `templateeditormode` varchar(7) collate utf8_unicode_ci default 'default', - `questionselectormode` varchar(7) collate utf8_unicode_ci default 'default', + `lang` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `email` varchar(320) COLLATE utf8_unicode_ci DEFAULT NULL, + `create_survey` tinyint(1) NOT NULL DEFAULT '0', + `create_user` tinyint(1) NOT NULL DEFAULT '0', + `participant_panel` tinyint(1) NOT NULL DEFAULT '0', + `delete_user` tinyint(1) NOT NULL DEFAULT '0', + `superadmin` tinyint(1) NOT NULL DEFAULT '0', + `configurator` tinyint(1) NOT NULL DEFAULT '0', + `manage_template` tinyint(1) NOT NULL DEFAULT '0', + `manage_label` tinyint(1) NOT NULL DEFAULT '0', + `htmleditormode` varchar(7) COLLATE utf8_unicode_ci DEFAULT 'default', + `templateeditormode` varchar(7) COLLATE utf8_unicode_ci DEFAULT 'default', + `questionselectormode` varchar(7) COLLATE utf8_unicode_ci DEFAULT 'default', `one_time_pw` blob, - `dateformat` int(11) NOT NULL default '1', - PRIMARY KEY (`uid`), + `dateformat` int(11) NOT NULL DEFAULT '1', + PRIMARY KEY (`uid`), UNIQUE KEY `users_name` (`users_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -1146,19 +979,14 @@ INSERT INTO `lime_users` (`uid`, `users_name`, `password`, `full_name`, `parent_ -- CREATE TABLE `lime_user_groups` ( - `ugid` int(11) NOT NULL auto_increment, - `name` varchar(20) collate utf8_unicode_ci NOT NULL, - `description` text collate utf8_unicode_ci NOT NULL, + `ugid` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci NOT NULL, `owner_id` int(11) NOT NULL, - PRIMARY KEY (`ugid`), + PRIMARY KEY (`ugid`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_user_groups` --- - - -- -------------------------------------------------------- -- @@ -1168,14 +996,9 @@ CREATE TABLE `lime_user_groups` ( CREATE TABLE `lime_user_in_groups` ( `ugid` int(11) NOT NULL, `uid` int(11) NOT NULL, - PRIMARY KEY (`ugid`,`uid`) + PRIMARY KEY (`ugid`,`uid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `lime_user_in_groups` --- - - -- -------------------------------------------------------- -- @@ -1183,25 +1006,20 @@ CREATE TABLE `lime_user_in_groups` ( -- CREATE TABLE `operator` ( - `operator_id` bigint(20) NOT NULL auto_increment, - `username` varchar(255) collate utf8_unicode_ci NOT NULL, - `firstName` varchar(255) collate utf8_unicode_ci NOT NULL, - `lastName` varchar(255) collate utf8_unicode_ci NOT NULL, - `Time_zone_name` char(64) collate utf8_unicode_ci NOT NULL, - `enabled` tinyint(1) NOT NULL default '1', - `voip` tinyint(1) NOT NULL default '1', - `next_case_id` bigint(20) default NULL, - `chat_enable` tinyint(1) default '0', - `chat_user` varchar(255) collate utf8_unicode_ci default NULL, - `chat_password` varchar(255) collate utf8_unicode_ci default NULL, - PRIMARY KEY (`operator_id`), + `operator_id` bigint(20) NOT NULL AUTO_INCREMENT, + `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `firstName` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `lastName` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `Time_zone_name` char(64) COLLATE utf8_unicode_ci NOT NULL, + `enabled` tinyint(1) NOT NULL DEFAULT '1', + `voip` tinyint(1) NOT NULL DEFAULT '1', + `next_case_id` bigint(20) DEFAULT NULL, + `chat_enable` tinyint(1) DEFAULT '0', + `chat_user` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `chat_password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`operator_id`), UNIQUE KEY `username` (`username`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `operator` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1212,14 +1030,9 @@ CREATE TABLE `operator` ( CREATE TABLE `operator_questionnaire` ( `operator_id` bigint(20) NOT NULL, `questionnaire_id` bigint(20) NOT NULL, - PRIMARY KEY (`operator_id`,`questionnaire_id`) + PRIMARY KEY (`operator_id`,`questionnaire_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `operator_questionnaire` --- - - -- -------------------------------------------------------- -- @@ -1229,14 +1042,9 @@ CREATE TABLE `operator_questionnaire` ( CREATE TABLE `operator_skill` ( `operator_id` bigint(20) NOT NULL, `outcome_type_id` int(11) NOT NULL, - PRIMARY KEY (`operator_id`,`outcome_type_id`) + PRIMARY KEY (`operator_id`,`outcome_type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `operator_skill` --- - - -- -------------------------------------------------------- -- @@ -1244,19 +1052,20 @@ CREATE TABLE `operator_skill` ( -- CREATE TABLE `outcome` ( - `outcome_id` int(11) NOT NULL auto_increment, - `aapor_id` char(6) collate utf8_unicode_ci NOT NULL, - `description` varchar(255) collate utf8_unicode_ci NOT NULL, + `outcome_id` int(11) NOT NULL AUTO_INCREMENT, + `aapor_id` char(6) COLLATE utf8_unicode_ci NOT NULL, + `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `default_delay_minutes` bigint(20) NOT NULL, - `outcome_type_id` int(11) NOT NULL default '1', - `tryanother` tinyint(1) NOT NULL default '1' COMMENT 'Whether to try the next number on the list', - `contacted` tinyint(1) NOT NULL default '1' COMMENT 'Whether a person was contacted', - `tryagain` tinyint(1) NOT NULL default '1' COMMENT 'Whether to try this number ever again', - `eligible` tinyint(1) NOT NULL default '1' COMMENT 'If the respondent is eligible to participate', - `require_note` tinyint(1) NOT NULL default '0' COMMENT 'Whether to require a note to be entered', - `calc` char(2) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`outcome_id`), - KEY `calc` (`calc`) + `outcome_type_id` int(11) NOT NULL DEFAULT '1', + `tryanother` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Whether to try the next number on the list', + `contacted` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Whether a person was contacted', + `tryagain` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Whether to try this number ever again', + `eligible` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'If the respondent is eligible to participate', + `require_note` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Whether to require a note to be entered', + `calc` char(2) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`outcome_id`), + KEY `calc` (`calc`), + KEY `outcome_type_id` (`outcome_type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -1266,24 +1075,24 @@ CREATE TABLE `outcome` ( INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(1, '3.11', 'Not attempted or worked', 0, 1, 1, 0, 1, 0, 0, 'UH'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(2, '3.13', 'No answer', 180, 1, 1, 0, 1, 1, 0, 'UH'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(3, '3.16', 'Technical phone problems', 180, 1, 1, 0, 1, 0, 0, 'UH'); -INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(4, '2.34', 'Other, Referred to Supervisor (Eligible)', 0, 2, 0, 1, 1, 1, 1, 'O'); +INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(4, '2.34', 'Other, Referred to Supervisor (Eligible)', 0, 2, 0, 1, 0, 1, 1, 'O'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(5, '3.91', 'Other, Referred to Supervisor (Unknown eligibility)', 0, 2, 0, 0, 1, 0, 1, 'UO'); -INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(6, '2.111a', 'Soft Refusal, Other', 10080, 3, 0, 1, 1, 1, 1, 'R'); +INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(6, '2.111a', 'Soft Refusal, Other', 10080, 3, 1, 1, 1, 1, 1, 'R'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(7, '2.111b', 'Hard Refusal, Other', 10080, 3, 0, 1, 1, 1, 1, 'R'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(8, '2.112a', 'Soft Refusal, Respondent', 10080, 3, 0, 1, 1, 1, 1, 'R'); -INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(9, '2.112b', 'Hard Refusal, Respondent', 10080, 3, 0, 1, 1, 1, 1, 'R'); +INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(9, '2.112b', 'Hard Refusal, Respondent', 0, 3, 0, 1, 0, 1, 1, 'R'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(10, '1.1', 'Complete', 0, 4, 0, 1, 1, 1, 0, 'I'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(11, '2.112', 'Known respondent refusal', 0, 4, 0, 1, 1, 1, 0, 'R'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(12, '2.111', 'Household-level refusal', 0, 4, 0, 1, 1, 1, 0, 'R'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(13, '2.112c', 'Broken appointment (Implicit refusal)', 10080, 3, 1, 0, 1, 1, 0, 'R'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(14, '4.32', 'Disconnected number', 0, 4, 1, 0, 0, 0, 0, ''); -INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(15, '4.20', 'Fax/data line', 0, 4, 1, 1, 0, 0, 0, ''); -INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(16, '4.51', 'Business, government office, other organization', 0, 4, 1, 1, 0, 0, 0, ''); -INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(17, '4.70', 'No eligible respondent', 0, 4, 1, 1, 0, 0, 0, ''); +INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(15, '4.20', 'Fax/data line', 0, 4, 1, 1, 0, 0, 0, 'NC'); +INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(16, '4.51', 'Business, government office, other organization', 0, 4, 1, 1, 0, 0, 0, 'O'); +INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(17, '4.70', 'No eligible respondent', 0, 4, 1, 1, 0, 0, 0, 'O'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(18, '2.35a', 'Accidental hang up or temporary phone problem', 0, 1, 1, 1, 1, 1, 0, 'O'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(19, '2.12a', 'Definite Appointment - Respondent', 0, 5, 0, 1, 1, 1, 0, 'R'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(20, '2.12b', 'Definite Appointment - Other', 0, 5, 0, 1, 1, 1, 0, 'R'); -INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(21, '2.13a', 'Unspecified Appointment - Respondent', 0, 5, 0, 1, 1, 1, 0, 'R'); +INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(21, '2.13a', 'Unspecified Appointment - Respondent', 0, 5, 0, 1, 1, 1, 1, 'R'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(22, '2.13b', 'Unspecified Appointment - Other', 0, 5, 0, 1, 1, 1, 0, 'R'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(23, '2.221', 'Household answering machine - Message left', 180, 1, 1, 1, 1, 1, 0, 'NC'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(24, '2.222', 'Household answering machine - No message left', 180, 1, 1, 1, 1, 1, 0, 'NC'); @@ -1292,10 +1101,12 @@ INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_m INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(27, '2.331', 'Household level language problem', 0, 4, 1, 1, 0, 1, 0, 'O'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(28, '2.332', 'Respondent language problem', 0, 4, 0, 1, 0, 1, 0, 'O'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(29, '3.14', 'Answering machine - Not a household', 0, 4, 1, 1, 0, 0, 0, 'UH'); -INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(30, '4.10', 'Out of sample', 0, 4, 0, 1, 0, 0, 0, ''); +INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(30, '4.10', 'Out of sample', 0, 4, 0, 1, 0, 0, 0, 'O'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(31, '2.20', 'Non contact', 180, 1, 1, 1, 1, 1, 0, 'NC'); -INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(32, '4.80', 'Quota filled', 0, 4, 0, 1, 0, 0, 0, ''); +INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(32, '4.80', 'Quota filled', 0, 4, 0, 1, 0, 0, 0, 'O'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(33, '2.36', 'Miscellaneous - Unavailable for a week', 10080, 1, 0, 1, 1, 1, 0, 'O'); +INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(34, '3.13', 'Max call attempts reached', 0, 4, 0, 1, 0, 1, 0, 'UH'); +INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(35, '3.13', 'Max calls reached', 0, 4, 0, 1, 0, 1, 0, 'UH'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(40, '1.1', 'Self completed online', 0, 4, 0, 1, 1, 1, 0, 'I'); INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(41, '2.36', 'Self completion email invitation sent', 10080, 1, 0, 1, 1, 1, 0, 'O'); @@ -1307,8 +1118,8 @@ INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_m CREATE TABLE `outcome_type` ( `outcome_type_id` int(11) NOT NULL, - `description` varchar(255) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`outcome_type_id`) + `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`outcome_type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -1328,19 +1139,14 @@ INSERT INTO `outcome_type` (`outcome_type_id`, `description`) VALUES(5, 'Appoint -- CREATE TABLE `process` ( - `process_id` bigint(20) NOT NULL auto_increment, - `type` int(11) NOT NULL default '1', + `process_id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` int(11) NOT NULL DEFAULT '1', `start` datetime NOT NULL, - `stop` datetime default NULL, - `kill` tinyint(1) NOT NULL default '0', - `data` longtext collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`process_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `process` --- - + `stop` datetime DEFAULT NULL, + `kill` tinyint(1) NOT NULL DEFAULT '0', + `data` longtext COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`process_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1349,33 +1155,30 @@ CREATE TABLE `process` ( -- CREATE TABLE `process_log` ( - `process_log_id` bigint(20) NOT NULL auto_increment, + `process_log_id` bigint(20) NOT NULL AUTO_INCREMENT, `process_id` bigint(20) NOT NULL, `datetime` datetime NOT NULL, - `data` text collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`process_log_id`), + `data` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`process_log_id`), KEY `process_id` (`process_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- -- --- Dumping data for table `process_log` --- - - -- Table structure for table `qsqr_question` -- --- CREATE TABLE `qsqr_question` ( - `qsqr_question_id` bigint(20) NOT NULL AUTO_INCREMENT, - `questionnaire_sample_quota_row_id` bigint(20) NOT NULL, - `lime_sgqa` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `value` varchar(2048) COLLATE utf8_unicode_ci NOT NULL, - `comparison` varchar(15) COLLATE utf8_unicode_ci NOT NULL, - `description` text COLLATE utf8_unicode_ci NOT NULL, - PRIMARY KEY (`qsqr_question_id`), - KEY `questionnaire_sample_quota_row_id` (`questionnaire_sample_quota_row_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + `qsqr_question_id` bigint(20) NOT NULL AUTO_INCREMENT, + `questionnaire_sample_quota_row_id` bigint(20) NOT NULL, + `lime_sgqa` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `value` varchar(2048) COLLATE utf8_unicode_ci NOT NULL, + `comparison` varchar(15) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`qsqr_question_id`), + KEY `questionnaire_sample_quota_row_id` (`questionnaire_sample_quota_row_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -1386,48 +1189,46 @@ CREATE TABLE `qsqr_question` ( CREATE TABLE `qsqr_sample` ( `qsqr_sample_id` bigint(20) NOT NULL AUTO_INCREMENT, `questionnaire_sample_quota_row_id` bigint(20) NOT NULL, + `exclude_var_id` bigint(20) NOT NULL, `exclude_var` char(128) COLLATE utf8_unicode_ci NOT NULL, `exclude_val` varchar(256) COLLATE utf8_unicode_ci NOT NULL, `comparison` varchar(15) COLLATE utf8_unicode_ci NOT NULL, `description` text COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`qsqr_sample_id`), KEY `questionnaire_sample_quota_row_id` (`questionnaire_sample_quota_row_id`), - KEY `exclude_var` (`exclude_var`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + KEY `exclude_var` (`exclude_var`), + KEY `exclude_var_id` (`exclude_var_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; +-- -------------------------------------------------------- -- -- Table structure for table `questionnaire` -- CREATE TABLE `questionnaire` ( - `questionnaire_id` bigint(20) NOT NULL auto_increment, - `description` varchar(255) collate utf8_unicode_ci NOT NULL, + `questionnaire_id` bigint(20) NOT NULL AUTO_INCREMENT, + `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `lime_sid` int(11) NOT NULL, - `restrict_appointments_shifts` tinyint(1) NOT NULL default '1', - `restrict_work_shifts` tinyint(1) NOT NULL default '1', - `testing` tinyint(1) NOT NULL default '0' COMMENT 'Whether this questionnaire is just for testing', - `respondent_selection` tinyint(1) NOT NULL default '1', - `rs_intro` text collate utf8_unicode_ci NOT NULL, - `rs_project_intro` text collate utf8_unicode_ci NOT NULL, - `rs_project_end` text collate utf8_unicode_ci NOT NULL, - `rs_callback` text collate utf8_unicode_ci NOT NULL, - `rs_answeringmachine` text collate utf8_unicode_ci NOT NULL, - `lime_rs_sid` int(11) default NULL, - `info` text collate utf8_unicode_ci, - `self_complete` tinyint(1) NOT NULL default '0', - `referral` TINYINT( 1 ) NOT NULL DEFAULT '0', - `lime_mode` varchar(64) collate utf8_unicode_ci default NULL COMMENT 'Limesurvey mode for respondent self completion', - `lime_template` varchar(128) collate utf8_unicode_ci default NULL COMMENT 'Limesurvey template for respondent self completion', - `lime_endurl` varchar(256) collate utf8_unicode_ci default NULL COMMENT 'Forwarding end URL for respondent self completion', - `enabled` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`questionnaire_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `questionnaire` --- - + `restrict_appointments_shifts` tinyint(1) NOT NULL DEFAULT '1', + `restrict_work_shifts` tinyint(1) NOT NULL DEFAULT '1', + `testing` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Whether this questionnaire is just for testing', + `respondent_selection` tinyint(1) NOT NULL DEFAULT '1', + `rs_intro` text COLLATE utf8_unicode_ci NOT NULL, + `rs_project_intro` text COLLATE utf8_unicode_ci NOT NULL, + `rs_project_end` text COLLATE utf8_unicode_ci NOT NULL, + `rs_callback` text COLLATE utf8_unicode_ci NOT NULL, + `rs_answeringmachine` text COLLATE utf8_unicode_ci NOT NULL, + `lime_rs_sid` int(11) DEFAULT NULL, + `info` text COLLATE utf8_unicode_ci, + `self_complete` tinyint(1) NOT NULL DEFAULT '0', + `referral` tinyint(1) NOT NULL DEFAULT '0', + `lime_mode` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Limesurvey mode for respondent self completion', + `lime_template` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Limesurvey template for respondent self completion', + `lime_endurl` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Forwarding end URL for respondent self completion', + `enabled` tinyint(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`questionnaire_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1438,14 +1239,9 @@ CREATE TABLE `questionnaire` ( CREATE TABLE `questionnaire_availability` ( `questionnaire_id` bigint(20) NOT NULL, `availability_group_id` bigint(20) NOT NULL, - PRIMARY KEY (`questionnaire_id`,`availability_group_id`) + PRIMARY KEY (`questionnaire_id`,`availability_group_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `questionnaire_availability` --- - - -- -------------------------------------------------------- -- @@ -1453,18 +1249,13 @@ CREATE TABLE `questionnaire_availability` ( -- CREATE TABLE `questionnaire_prefill` ( - `questionnaire_prefill_id` bigint(20) NOT NULL auto_increment, + `questionnaire_prefill_id` bigint(20) NOT NULL AUTO_INCREMENT, `questionnaire_id` bigint(20) NOT NULL, - `lime_sgqa` varchar(255) collate utf8_unicode_ci NOT NULL, - `value` varchar(2048) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`questionnaire_prefill_id`), + `lime_sgqa` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `value` varchar(2048) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`questionnaire_prefill_id`), KEY `questionnaire_id` (`questionnaire_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `questionnaire_prefill` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1475,19 +1266,14 @@ CREATE TABLE `questionnaire_prefill` ( CREATE TABLE `questionnaire_sample` ( `questionnaire_id` bigint(20) NOT NULL, `sample_import_id` bigint(20) NOT NULL, - `call_max` int(11) NOT NULL default '0', - `call_attempt_max` int(11) NOT NULL default '0', - `random_select` tinyint(1) NOT NULL default '0', - `answering_machine_messages` int(11) NOT NULL default '1', - `allow_new` TINYINT( 1 ) NOT NULL DEFAULT '1', - PRIMARY KEY (`questionnaire_id`,`sample_import_id`) + `call_max` int(11) NOT NULL DEFAULT '0', + `call_attempt_max` int(11) NOT NULL DEFAULT '0', + `random_select` tinyint(1) NOT NULL DEFAULT '0', + `answering_machine_messages` int(11) NOT NULL DEFAULT '1', + `allow_new` tinyint(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`questionnaire_id`,`sample_import_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `questionnaire_sample` --- - - -- -------------------------------------------------------- -- @@ -1497,21 +1283,16 @@ CREATE TABLE `questionnaire_sample` ( CREATE TABLE `questionnaire_sample_exclude_priority` ( `questionnaire_id` bigint(20) NOT NULL, `sample_id` bigint(20) NOT NULL, - `exclude` tinyint(1) NOT NULL default '0', - `priority` tinyint(3) NOT NULL default '50', - `sortorder` int(11) default NULL, - PRIMARY KEY (`questionnaire_id`,`sample_id`), + `exclude` tinyint(1) NOT NULL DEFAULT '0', + `priority` tinyint(3) NOT NULL DEFAULT '50', + `sortorder` int(11) DEFAULT NULL, + PRIMARY KEY (`questionnaire_id`,`sample_id`), KEY `exclude` (`exclude`), KEY `priority` (`priority`), KEY `questionnaire_id` (`questionnaire_id`), KEY `sortorder` (`sortorder`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `questionnaire_sample_exclude_priority` --- - - -- -------------------------------------------------------- -- @@ -1519,21 +1300,16 @@ CREATE TABLE `questionnaire_sample_exclude_priority` ( -- CREATE TABLE `questionnaire_sample_quota` ( - `questionnaire_sample_quota_id` bigint(20) NOT NULL auto_increment, + `questionnaire_sample_quota_id` bigint(20) NOT NULL AUTO_INCREMENT, `questionnaire_id` bigint(20) NOT NULL, `sample_import_id` bigint(20) NOT NULL, - `lime_sgqa` varchar(255) collate utf8_unicode_ci NOT NULL, - `value` varchar(2048) collate utf8_unicode_ci NOT NULL, - `comparison` varchar(15) collate utf8_unicode_ci NOT NULL default 'LIKE', + `lime_sgqa` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `value` varchar(2048) COLLATE utf8_unicode_ci NOT NULL, + `comparison` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'LIKE', `completions` int(11) NOT NULL, - `quota_reached` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`questionnaire_sample_quota_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `questionnaire_sample_quota` --- - + `quota_reached` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`questionnaire_sample_quota_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1542,24 +1318,19 @@ CREATE TABLE `questionnaire_sample_quota` ( -- CREATE TABLE `questionnaire_sample_quota_row` ( - `questionnaire_sample_quota_row_id` bigint(20) NOT NULL auto_increment, + `questionnaire_sample_quota_row_id` bigint(20) NOT NULL AUTO_INCREMENT, `questionnaire_id` bigint(20) NOT NULL, `sample_import_id` bigint(20) NOT NULL, `completions` int(11) NOT NULL, - `quota_reached` tinyint(1) NOT NULL default '0', - `current_completions` int(11) NOT NULL default '0', - `description` text collate utf8_unicode_ci NOT NULL, - `priority` tinyint(3) NOT NULL default '50' COMMENT 'Priority from 0 - 100', - `autoprioritise` tinyint(1) NOT NULL default '0' COMMENT 'Should this row have it''s priority automatically adjusted to 100 - (completions %)', - PRIMARY KEY (`questionnaire_sample_quota_row_id`), + `quota_reached` tinyint(1) NOT NULL DEFAULT '0', + `current_completions` int(11) NOT NULL DEFAULT '0', + `description` text COLLATE utf8_unicode_ci NOT NULL, + `priority` tinyint(3) NOT NULL DEFAULT '50' COMMENT 'Priority from 0 - 100', + `autoprioritise` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Should this row have it''s priority automatically adjusted to 100 - (completions %)', + PRIMARY KEY (`questionnaire_sample_quota_row_id`), KEY `questionnaire_id` (`questionnaire_id`), KEY `sample_import_id` (`sample_import_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `questionnaire_sample_quota_row` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1571,31 +1342,35 @@ CREATE TABLE `questionnaire_sample_quota_row_exclude` ( `questionnaire_sample_quota_row_id` bigint(20) NOT NULL, `questionnaire_id` bigint(20) NOT NULL, `sample_id` bigint(20) NOT NULL, - PRIMARY KEY (`questionnaire_sample_quota_row_id`,`questionnaire_id`,`sample_id`), + PRIMARY KEY (`questionnaire_sample_quota_row_id`,`questionnaire_id`,`sample_id`), KEY `questionnaire_id` (`questionnaire_id`), KEY `sample_id` (`sample_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +-- -------------------------------------------------------- + -- --- Dumping data for table `questionnaire_sample_quota_row_exclude` +-- Table structure for table `questionnaire_sample_timeslot` -- CREATE TABLE `questionnaire_sample_timeslot` ( -`questionnaire_id` bigint( 20 ) NOT NULL , -`sample_import_id` bigint( 20 ) NOT NULL , -`availability_group_id` bigint( 20 ) NOT NULL , -PRIMARY KEY ( `questionnaire_id` , `availability_group_id` , `sample_import_id` ) -) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; + `questionnaire_id` bigint(20) NOT NULL, + `sample_import_id` bigint(20) NOT NULL, + `availability_group_id` bigint(20) NOT NULL, + PRIMARY KEY (`questionnaire_id`,`availability_group_id`,`sample_import_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- - +-- +-- Table structure for table `questionnaire_timeslot` +-- CREATE TABLE `questionnaire_timeslot` ( -`questionnaire_id` bigint( 20 ) NOT NULL , -`availability_group_id` bigint( 20 ) NOT NULL , -PRIMARY KEY ( `questionnaire_id` , `availability_group_id` ) -) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; + `questionnaire_id` bigint(20) NOT NULL, + `availability_group_id` bigint(20) NOT NULL, + PRIMARY KEY (`questionnaire_id`,`availability_group_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1604,19 +1379,14 @@ PRIMARY KEY ( `questionnaire_id` , `availability_group_id` ) -- CREATE TABLE `respondent` ( - `respondent_id` bigint(20) NOT NULL auto_increment, + `respondent_id` bigint(20) NOT NULL AUTO_INCREMENT, `case_id` bigint(20) NOT NULL, - `firstName` varchar(255) collate utf8_unicode_ci NOT NULL, - `lastName` varchar(255) collate utf8_unicode_ci NOT NULL, - `Time_zone_name` char(64) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`respondent_id`), + `firstName` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `lastName` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `Time_zone_name` char(64) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`respondent_id`), KEY `case_id` (`case_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `respondent` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1625,19 +1395,14 @@ CREATE TABLE `respondent` ( -- CREATE TABLE `respondent_not_available` ( - `respondent_not_available_id` bigint(20) NOT NULL auto_increment, + `respondent_not_available_id` bigint(20) NOT NULL AUTO_INCREMENT, `respondent_id` bigint(20) NOT NULL, `start` datetime NOT NULL, `end` datetime NOT NULL, - PRIMARY KEY (`respondent_not_available_id`), + PRIMARY KEY (`respondent_not_available_id`), KEY `respondent_id` (`respondent_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `respondent_not_available` --- - - -- -------------------------------------------------------- -- @@ -1645,18 +1410,15 @@ CREATE TABLE `respondent_not_available` ( -- CREATE TABLE `sample` ( - `sample_id` bigint(20) NOT NULL auto_increment, + `sample_id` bigint(20) NOT NULL AUTO_INCREMENT, `import_id` bigint(20) NOT NULL, - `Time_zone_name` char(64) collate utf8_unicode_ci NOT NULL, - `phone` char(30) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`sample_id`), - KEY `import_id` (`import_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `sample` --- - + `Time_zone_name` char(64) COLLATE utf8_unicode_ci NOT NULL, + `phone` char(30) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`sample_id`), + KEY `import_id` (`import_id`), + KEY `sample_id` (`sample_id`), + KEY `Time_zone_name` (`Time_zone_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1665,13 +1427,15 @@ CREATE TABLE `sample` ( -- CREATE TABLE `sample_import` ( - `sample_import_id` bigint(20) NOT NULL auto_increment, - `description` varchar(255) collate utf8_unicode_ci NOT NULL, - `call_restrict` tinyint(1) NOT NULL default '1', - `refusal_conversion` tinyint(1) NOT NULL default '1', - `enabled` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`sample_import_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + `sample_import_id` bigint(20) NOT NULL AUTO_INCREMENT, + `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `call_restrict` tinyint(1) NOT NULL DEFAULT '1', + `refusal_conversion` tinyint(1) NOT NULL DEFAULT '1', + `enabled` tinyint(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`sample_import_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- -- -- Table structure for table `sample_import_var_restrict` @@ -1679,10 +1443,15 @@ CREATE TABLE `sample_import` ( CREATE TABLE `sample_import_var_restrict` ( `sample_import_id` bigint(20) NOT NULL, - `var` char(128) collate utf8_unicode_ci NOT NULL, - `restrict` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`sample_import_id`,`var`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + `var_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `var` char(128) COLLATE utf8_unicode_ci NOT NULL, + `type` smallint(10) unsigned NOT NULL, + `restrict` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`var_id`), + UNIQUE KEY `var_id` (`var_id`), + KEY `type` (`type`), + KEY `sample_import_id` (`sample_import_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1692,15 +1461,10 @@ CREATE TABLE `sample_import_var_restrict` ( CREATE TABLE `sample_postcode_timezone` ( `val` int(4) NOT NULL, - `Time_zone_name` char(64) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`val`) + `Time_zone_name` char(64) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`val`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `sample_postcode_timezone` --- - - -- -------------------------------------------------------- -- @@ -1708,16 +1472,11 @@ CREATE TABLE `sample_postcode_timezone` ( -- CREATE TABLE `sample_prefix_timezone` ( - `val` char(10) collate utf8_unicode_ci NOT NULL, - `Time_zone_name` char(64) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`val`) + `val` char(10) COLLATE utf8_unicode_ci NOT NULL, + `Time_zone_name` char(64) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`val`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `sample_prefix_timezone` --- - - -- -------------------------------------------------------- -- @@ -1725,16 +1484,11 @@ CREATE TABLE `sample_prefix_timezone` ( -- CREATE TABLE `sample_state_timezone` ( - `val` varchar(64) collate utf8_unicode_ci NOT NULL, - `Time_zone_name` char(64) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`val`) + `val` varchar(64) COLLATE utf8_unicode_ci NOT NULL, + `Time_zone_name` char(64) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`val`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `sample_state_timezone` --- - - -- -------------------------------------------------------- -- @@ -1743,18 +1497,14 @@ CREATE TABLE `sample_state_timezone` ( CREATE TABLE `sample_var` ( `sample_id` bigint(20) NOT NULL, - `var` char(128) collate utf8_unicode_ci NOT NULL, - `val` varchar(256) collate utf8_unicode_ci NOT NULL, + `var_id` bigint(20) unsigned NOT NULL, + `val` varchar(256) COLLATE utf8_unicode_ci NOT NULL, `type` int(11) NOT NULL, - PRIMARY KEY (`sample_id`,`var`), - KEY `sample_id` (`sample_id`) + KEY `sample_id` (`sample_id`), + KEY `var_id` (`var_id`), + KEY `type` (`type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `sample_var` --- - - -- -------------------------------------------------------- -- @@ -1762,10 +1512,12 @@ CREATE TABLE `sample_var` ( -- CREATE TABLE `sample_var_type` ( - `type` int(11) NOT NULL auto_increment, - `description` varchar(255) collate utf8_unicode_ci NOT NULL, - `table` varchar(255) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`type`) + `type` int(11) NOT NULL AUTO_INCREMENT, + `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `table` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`type`), + KEY `type` (`type`,`description`), + KEY `description` (`description`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -1788,21 +1540,16 @@ INSERT INTO `sample_var_type` (`type`, `description`, `table`) VALUES(8, 'Email -- CREATE TABLE `sessions2` ( - `sesskey` varchar(64) collate utf8_unicode_ci NOT NULL default '', + `sesskey` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `expiry` datetime NOT NULL, - `expireref` varchar(250) collate utf8_unicode_ci default '', + `expireref` varchar(250) COLLATE utf8_unicode_ci DEFAULT '', `created` datetime NOT NULL, `modified` datetime NOT NULL, - `sessdata` longtext collate utf8_unicode_ci, - PRIMARY KEY (`sesskey`), + `sessdata` longtext COLLATE utf8_unicode_ci, + PRIMARY KEY (`sesskey`), KEY `sess2_expiry` (`expiry`), KEY `sess2_expireref` (`expireref`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `sessions2` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1811,21 +1558,24 @@ CREATE TABLE `sessions2` ( -- CREATE TABLE `setting` ( - `setting_id` int(11) NOT NULL auto_increment, - `field` varchar(255) collate utf8_unicode_ci NOT NULL, - `value` text collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`setting_id`), - UNIQUE KEY `field` (`field`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Serialised table of settings'; + `setting_id` int(11) NOT NULL AUTO_INCREMENT, + `field` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `value` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`setting_id`), + UNIQUE KEY `field` (`field`), + KEY `setting_id` (`setting_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Serialised table of settings'; -- -- Dumping data for table `setting` -- -INSERT INTO `setting` (`setting_id`, `field`, `value`) VALUES -(1, 'DEFAULT_TIME_ZONE', 's:18:"Australia/Victoria";'), -(2, 'systemsort', 'b:0;'); - +INSERT INTO `setting` (`setting_id`, `field`, `value`) VALUES(1, 'information', 's:120:"

\r\n CATI center name&info

\r\n

\r\n

\r\n";'); +INSERT INTO `setting` (`setting_id`, `field`, `value`) VALUES(2, 'systemsort', 'b:0;'); +INSERT INTO `setting` (`setting_id`, `field`, `value`) VALUES(3, 'bosh_service', 's:44:"https://some_jabber_server:port";'); +INSERT INTO `setting` (`setting_id`, `field`, `value`) VALUES(4, 'supervisor_xmpp', 's:12:"jabber_login";'); +INSERT INTO `setting` (`setting_id`, `field`, `value`) VALUES(5, 'chat_enabled', 'b:0;'); +INSERT INTO `setting` (`setting_id`, `field`, `value`) VALUES(6, 'DEFAULT_TIME_ZONE', 's:13:"Europe/Moscow";'); -- -------------------------------------------------------- @@ -1834,18 +1584,13 @@ INSERT INTO `setting` (`setting_id`, `field`, `value`) VALUES -- CREATE TABLE `shift` ( - `shift_id` bigint(20) NOT NULL auto_increment, + `shift_id` bigint(20) NOT NULL AUTO_INCREMENT, `questionnaire_id` bigint(20) NOT NULL, `start` datetime NOT NULL, `end` datetime NOT NULL, - PRIMARY KEY (`shift_id`), + PRIMARY KEY (`shift_id`), KEY `questionnaire_id` (`questionnaire_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `shift` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1854,19 +1599,14 @@ CREATE TABLE `shift` ( -- CREATE TABLE `shift_report` ( - `shift_report_id` bigint(20) NOT NULL auto_increment, + `shift_report_id` bigint(20) NOT NULL AUTO_INCREMENT, `shift_id` bigint(20) NOT NULL, `operator_id` bigint(20) NOT NULL, - `report` text collate utf8_unicode_ci NOT NULL, + `report` text COLLATE utf8_unicode_ci NOT NULL, `datetime` datetime NOT NULL, - PRIMARY KEY (`shift_report_id`), + PRIMARY KEY (`shift_report_id`), KEY `shift_id` (`shift_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `shift_report` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- @@ -1900,11 +1640,7 @@ INSERT INTO `shift_template` (`day_of_week`, `start`, `end`) VALUES(7, '13:00:00 -- CREATE TABLE `timezone_template` ( - `Time_zone_name` char(64) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`Time_zone_name`) + `Time_zone_name` char(64) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`Time_zone_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `timezone_template` --- - diff --git a/nocaseavailable.php b/nocaseavailable.php index af2a77fa..42e8c330 100644 --- a/nocaseavailable.php +++ b/nocaseavailable.php @@ -156,7 +156,7 @@ $sql = "SELECT count(s.sample_id) as count_samples AND si.enabled = 1 AND !(si.call_restrict = 1 AND cr.day_of_week IS NULL) AND ou.outcome_type_id IN( SELECT outcome_type_id FROM operator_skill WHERE operator_id = '$operator_id') - AND ou.outcome_id NOT IN (10,25,28,33,34,40) "; + AND ou.outcome_id NOT IN (10,25,28,34,35,40) "; $rs = $db->GetRow($sql); diff --git a/waitnextcase_interface2.php b/waitnextcase_interface2.php index 3f05625d..c8a2624d 100644 --- a/waitnextcase_interface2.php +++ b/waitnextcase_interface2.php @@ -138,7 +138,7 @@ else //assigned to operator - // call restrictions and outside times, operator skill and filter outcomes 10,25,28,33,34,40 + // call restrictions and outside times, operator skill and filter outcomes 10,25,28,34,35,40 $sql = "SELECT COUNT( DISTINCT sv.sample_id) as count_samples FROM `sample` as s JOIN `sample_var` as sv on( s.sample_id = sv.sample_id ) @@ -149,7 +149,7 @@ else AND s.import_id IN ($siid) AND !(si.call_restrict = 1 AND cr.day_of_week IS NULL) AND ou.outcome_type_id IN( SELECT outcome_type_id FROM operator_skill WHERE operator_id = '$operator_id') - AND ou.outcome_id NOT IN (10,25,28,33,34,40)"; + AND ou.outcome_id NOT IN (10,25,28,34,35,40)"; $cases_count = $db->GetRow($sql); if ($cases_count['count_samples'] == 0){