anchor.diff:  /*!40101 SET character_set_client = @saved_cs_client */;
   
   --
  --- Dumping data for table `Group`
  ---
  -
  -LOCK TABLES `Group` WRITE;
  -/*!40000 ALTER TABLE `Group` DISABLE KEYS */;
  -INSERT INTO `Group` VALUES (1001,'BBC_ADMIN',NULL),(1002,'BBC_RESEARCHER',NULL),(1003,'BBC_GUEST',NULL),(1004,'AUDITOR',NULL),(1005,'ETHICS_BOARD',NULL);
  -/*!40000 ALTER TABLE `Group` ENABLE KEYS */;
  -UNLOCK TABLES;
  -
  ---
  --- Table structure for table `People`
  ---
  -
  -DROP TABLE IF EXISTS `People`;
  -/*!40101 SET @saved_cs_client     = @@character_set_client */;
  -/*!40101 SET character_set_client = utf8 */;
  -CREATE TABLE `People` (
  -  `uid` int(10) NOT NULL DEFAULT '1000',
  -  `username` varchar(10) NOT NULL,
  -  `password` varchar(128) NOT NULL,
  -  `email` varchar(45) DEFAULT NULL,
  -  `fname` varchar(30) DEFAULT NULL,
  -  `lname` varchar(30) DEFAULT NULL,
  -  `activated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  -  `home_org` varchar(100) DEFAULT NULL,
  -  `title` varchar(10) DEFAULT NULL,
  -  `mobile` varchar(20) DEFAULT NULL,
  -  `orcid` varchar(20) DEFAULT NULL,
  -  `false_login` int(11) NOT NULL DEFAULT '0',
  -  `active` int(11) NOT NULL DEFAULT '-1',
  -  `isonline` int(11) NOT NULL DEFAULT '-1',
  -  `secret` varchar(20) DEFAULT NULL,
  -  `security_question` varchar(20) DEFAULT NULL,
  -  `security_answer` varchar(128) DEFAULT NULL,
  -  PRIMARY KEY (`uid`)
  -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  -/*!40101 SET character_set_client = @saved_cs_client */;
  -
  ---
  --- Dumping data for table `People`
  ---
  -
  -LOCK TABLES `People` WRITE;
  -/*!40000 ALTER TABLE `People` DISABLE KEYS */;
  -/*!40000 ALTER TABLE `People` ENABLE KEYS */;
  -UNLOCK TABLES;
  -
  -
  -
  ---
  --- Table structure for table `Login`
  ---
  -
  -DROP TABLE IF EXISTS `Login`;
  -/*!40101 SET @saved_cs_client     = @@character_set_client */;
  -/*!40101 SET character_set_client = utf8 */;
  -CREATE TABLE `Login` (
  -  `loginid` bigint(20) NOT NULL AUTO_INCREMENT,
  -  `People_uid` int(10) DEFAULT NULL,
  -  `last_login` timestamp NULL DEFAULT NULL,
  -  `last_ip` varchar(45) DEFAULT NULL,
  -  `os_platform` int(11) DEFAULT NULL,
  -  `logout` timestamp NULL DEFAULT NULL,
  -  PRIMARY KEY (`loginid`),
  -  KEY `fk_login_people` (`People_uid`),
  -  CONSTRAINT `fk_login_people` FOREIGN KEY (`People_uid`) REFERENCES `People` (`uid`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  -  CONSTRAINT `FK_Login_People_uid` FOREIGN KEY (`People_uid`) REFERENCES `People` (`uid`)
  -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  -/*!40101 SET character_set_client = @saved_cs_client */;
  -
  ---
  --- Dumping data for table `Login`
  ---
  -
  -LOCK TABLES `Login` WRITE;
  -/*!40000 ALTER TABLE `Login` DISABLE KEYS */;
  -/*!40000 ALTER TABLE `Login` ENABLE KEYS */;
  -UNLOCK TABLES;
  -
  ---
  --- Table structure for table `People_Group`
  ---
  -
  -DROP TABLE IF EXISTS `People_Group`;
  -/*!40101 SET @saved_cs_client     = @@character_set_client */;
  -/*!40101 SET character_set_client = utf8 */;
  -CREATE TABLE `People_Group` (
  -  `uid` int(10) NOT NULL,
  -  `gid` int(10) NOT NULL,
  -  PRIMARY KEY (`uid`,`gid`),
  -  KEY `fk_people_has_group_group1` (`gid`),
  -  KEY `fk_people_has_groups_people` (`uid`),
  -  CONSTRAINT `fk_group` FOREIGN KEY (`gid`) REFERENCES `Group` (`gid`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  -  CONSTRAINT `fk_people` FOREIGN KEY (`uid`) REFERENCES `People` (`uid`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  -  CONSTRAINT `FK_People_Group_uid` FOREIGN KEY (`uid`) REFERENCES `People` (`uid`)
  -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  -/*!40101 SET character_set_client = @saved_cs_client */;
  -
  ---
  --- Dumping data for table `People_Group`
  ---
  -
  -LOCK TABLES `People_Group` WRITE;
  -/*!40000 ALTER TABLE `People_Group` DISABLE KEYS */;
  -/*!40000 ALTER TABLE `People_Group` ENABLE KEYS */;
  -UNLOCK TABLES;
  -
  ---
  --- Table structure for table `Yubikey`
  ---
  -
  -DROP TABLE IF EXISTS `Yubikey`;
  -/*!40101 SET @saved_cs_client     = @@character_set_client */;
  -/*!40101 SET character_set_client = utf8 */;
  -CREATE TABLE `Yubikey` (
  -  `yubidnum` varchar(45) NOT NULL,
  -  `serial` varchar(10) DEFAULT NULL,
  -  `version` varchar(15) DEFAULT NULL,
  -  `active` tinyint(1) DEFAULT NULL,
  -  `notes` varchar(100) DEFAULT NULL,
  -  `counter` int(11) DEFAULT NULL,
  -  `low` int(11) DEFAULT NULL,
  -  `high` int(11) DEFAULT NULL,
  -  `session_use` int(11) DEFAULT NULL,
  -  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  -  `aes_secret` varchar(100) DEFAULT NULL,
  -  `public_id` varchar(40) DEFAULT NULL,
  -  `People_uid` int(10) DEFAULT NULL,
  -  PRIMARY KEY (`yubidnum`),
  -  KEY `fk_Yubikey_People_idx` (`People_uid`),
  -  CONSTRAINT `fk_Yubikey_People1` FOREIGN KEY (`People_uid`) REFERENCES `People` (`uid`) ON DELETE NO ACTION ON UPDATE NO ACTION
  -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  -/*!40101 SET character_set_client = @saved_cs_client */;
  -
  ---
  --- Dumping data for table `Yubikey`
  ---
  -
  -LOCK TABLES `Yubikey` WRITE;
  -/*!40000 ALTER TABLE `Yubikey` DISABLE KEYS */;
  -/*!40000 ALTER TABLE `Yubikey` ENABLE KEYS */;
  -UNLOCK TABLES;
  -
  ---
  --- Temporary table structure for view `v_People_Group`
  ---
  -
  -DROP TABLE IF EXISTS `v_People_Group`;
  -/*!50001 DROP VIEW IF EXISTS `v_People_Group`*/;
  +-- Table structure for table `Inodes`
  +--
  +
  +DROP TABLE IF EXISTS `Inodes`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `Inodes` (
  +  `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  +  `name` varchar(128) NOT NULL,
  +  `pid` mediumint(9) DEFAULT NULL,
  +  `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  +  `isDir` tinyint(1) NOT NULL,
  +  `size` int(11) DEFAULT NULL,
  +  `status` enum('uploading','copying_to_hdfs','available') NOT NULL,
  +  PRIMARY KEY (`id`),
  +  UNIQUE KEY `pid_3` (`pid`,`name`),
  +  KEY `pid` (`pid`),
  +  KEY `pid_2` (`pid`,`isDir`),
  +  KEY `name` (`name`),
  +  CONSTRAINT `Inodes_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `Inodes` (`id`) ON DELETE CASCADE
  +) ENGINE=InnoDB AUTO_INCREMENT=419 DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `Roles`
  +--
  +
  +DROP TABLE IF EXISTS `Roles`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `Roles` (
  +  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  +  `CLUSTER` varchar(48) NOT NULL,
  +  `HOSTID` varchar(128) NOT NULL,
  +  `PID` int(11) DEFAULT NULL,
  +  `ROLE_` varchar(48) NOT NULL,
  +  `SERVICE` varchar(48) NOT NULL,
  +  `STATUS` int(11) NOT NULL,
  +  `UPTIME` bigint(20) DEFAULT NULL,
  +  `WEBPORT` int(11) DEFAULT NULL,
  +  PRIMARY KEY (`ID`)
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `STUDY_GROUPS`
  +--
  +
  +DROP TABLE IF EXISTS `STUDY_GROUPS`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `STUDY_GROUPS` (
  +  `email` varchar(255) NOT NULL,
  +  `groupname` varchar(64) NOT NULL,
  +  PRIMARY KEY (`email`,`groupname`)
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Temporary view structure for view `StudyDetails`
  +--
  +
  +DROP TABLE IF EXISTS `StudyDetails`;
  +/*!50001 DROP VIEW IF EXISTS `StudyDetails`*/;
   SET @saved_cs_client     = @@character_set_client;
   SET character_set_client = utf8;
  -/*!50001 CREATE TABLE `v_People_Group` (
  -  `username` tinyint NOT NULL,
  -  `password` tinyint NOT NULL,
  -  `secret` tinyint NOT NULL,
  -  `email` tinyint NOT NULL,
  -  `group_name` tinyint NOT NULL
  -) ENGINE=MyISAM */;
  +/*!50001 CREATE VIEW `StudyDetails` AS SELECT 
  + 1 AS `studyName`,
  + 1 AS `email`,
  + 1 AS `creator`*/;
   SET character_set_client = @saved_cs_client;
   
   --
  --- Final view structure for view `v_People_Group`
  ---
  -
  -/*!50001 DROP TABLE IF EXISTS `v_People_Group`*/;
  -/*!50001 DROP VIEW IF EXISTS `v_People_Group`*/;
  +-- Table structure for table `StudyRoles`
  +--
  +
  +DROP TABLE IF EXISTS `StudyRoles`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `StudyRoles` (
  +  `id` int(11) NOT NULL,
  +  `email` varchar(255) DEFAULT NULL,
  +  `study_role` varchar(255) DEFAULT NULL,
  +  PRIMARY KEY (`id`)
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `StudyTeam`
  +--
  +
  +DROP TABLE IF EXISTS `StudyTeam`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `StudyTeam` (
  +  `name` varchar(255) NOT NULL,
  +  `team_member` varchar(255) NOT NULL,
  +  `team_role` enum('Master','Researcher','Auditor') NOT NULL,
  +  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  +  PRIMARY KEY (`name`,`team_member`),
  +  KEY `fk_studyTeam_users` (`team_member`),
  +  CONSTRAINT `fk_studyTeam_users` FOREIGN KEY (`team_member`) REFERENCES `USERS` (`EMAIL`) ON DELETE CASCADE,
  +  CONSTRAINT `fk_study_studyTeam` FOREIGN KEY (`name`) REFERENCES `study` (`name`) ON DELETE CASCADE
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `USERS`
  +--
  +
  +DROP TABLE IF EXISTS `USERS`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `USERS` (
  +  `EMAIL` varchar(255) NOT NULL,
  +  `MOBILENUM` varchar(255) NOT NULL,
  +  `NAME` varchar(255) NOT NULL,
  +  `PASSWORD` varchar(128) NOT NULL,
  +  `REGISTEREDON` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  +  `SALT` longblob NOT NULL,
  +  `STATUS` int(11) NOT NULL,
  +  PRIMARY KEY (`EMAIL`)
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `USERS_GROUPS`
  +--
  +
  +DROP TABLE IF EXISTS `USERS_GROUPS`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `USERS_GROUPS` (
  +  `email` varchar(255) NOT NULL,
  +  `groupname` varchar(64) NOT NULL,
  +  PRIMARY KEY (`email`,`groupname`),
  +  UNIQUE KEY `UNQ_USERS_GROUPS_0` (`email`,`groupname`),
  +  CONSTRAINT `FK_USERS_GROUPS_email` FOREIGN KEY (`email`) REFERENCES `USERS` (`EMAIL`),
  +  CONSTRAINT `USERS_GROUPS_ibfk_1` FOREIGN KEY (`email`) REFERENCES `USERS` (`EMAIL`) ON DELETE CASCADE
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +
  +--
  +-- Table structure for table `activity`
  +--
  +
  +DROP TABLE IF EXISTS `activity`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `activity` (
  +  `id` int(11) NOT NULL AUTO_INCREMENT,
  +  `activity` varchar(128) DEFAULT NULL,
  +  `performed_By` varchar(255) DEFAULT NULL,
  +  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  +  `flag` enum('DATA','STUDY','TEAM','USERS') DEFAULT NULL,
  +  `activity_on` varchar(255) NOT NULL,
  +  PRIMARY KEY (`id`)
  +) ENGINE=InnoDB AUTO_INCREMENT=383 DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Temporary view structure for view `activitydetails`
  +--
  +
  +DROP TABLE IF EXISTS `activitydetails`;
  +/*!50001 DROP VIEW IF EXISTS `activitydetails`*/;
  +SET @saved_cs_client     = @@character_set_client;
  +SET character_set_client = utf8;
  +/*!50001 CREATE VIEW `activitydetails` AS SELECT 
  + 1 AS `id`,
  + 1 AS `performed_by_email`,
  + 1 AS `performed_by_name`,
  + 1 AS `description`,
  + 1 AS `studyname`,
  + 1 AS `timestamp`*/;
  +SET character_set_client = @saved_cs_client;
  +
  +--
  +-- Table structure for table `collection_type`
  +--
  +
  +DROP TABLE IF EXISTS `collection_type`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `collection_type` (
  +  `collection_id` varchar(255) NOT NULL DEFAULT '',
  +  `type_id` int(11) NOT NULL DEFAULT '0',
  +  PRIMARY KEY (`collection_id`,`type_id`),
  +  KEY `type_id` (`type_id`),
  +  CONSTRAINT `collection_type_ibfk_1` FOREIGN KEY (`collection_id`) REFERENCES `samplecollection` (`id`),
  +  CONSTRAINT `collection_type_ibfk_2` FOREIGN KEY (`type_id`) REFERENCES `COLLECTION_TYPES` (`id`)
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `job_execution_files`
  +--
  +
  +DROP TABLE IF EXISTS `job_execution_files`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `job_execution_files` (
  +  `job_id` bigint(20) unsigned NOT NULL,
  +  `name` varchar(255) NOT NULL,
  +  `path` varchar(255) NOT NULL,
  +  PRIMARY KEY (`job_id`,`name`),
  +  CONSTRAINT `job_execution_files_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `jobhistory` (`id`)
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `job_input_files`
  +--
  +
  +DROP TABLE IF EXISTS `job_input_files`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `job_input_files` (
  +  `job_id` bigint(20) unsigned NOT NULL,
  +  `path` varchar(255) NOT NULL,
  +  `name` varchar(255) NOT NULL,
  +  PRIMARY KEY (`job_id`,`name`),
  +  CONSTRAINT `job_input_files_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `jobhistory` (`id`)
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `job_output_files`
  +--
  +
  +DROP TABLE IF EXISTS `job_output_files`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `job_output_files` (
  +  `job_id` bigint(20) unsigned NOT NULL,
  +  `name` varchar(255) NOT NULL,
  +  `path` varchar(255) NOT NULL,
  +  PRIMARY KEY (`job_id`,`name`),
  +  CONSTRAINT `job_output_files_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `jobhistory` (`id`)
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `jobhistory`
  +--
  +
  +DROP TABLE IF EXISTS `jobhistory`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `jobhistory` (
  +  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  +  `name` varchar(128) DEFAULT NULL,
  +  `submission_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  +  `study` varchar(128) NOT NULL,
  +  `user` varchar(255) NOT NULL,
  +  `state` varchar(128) NOT NULL,
  +  `execution_duration` bigint(20) DEFAULT NULL,
  +  `args` varchar(255) DEFAULT NULL,
  +  `stdout_path` varchar(255) DEFAULT NULL,
  +  `stderr_path` varchar(255) DEFAULT NULL,
  +  `type` varchar(128) DEFAULT NULL,
  +  PRIMARY KEY (`id`),
  +  UNIQUE KEY `id` (`id`),
  +  KEY `study` (`study`),
  +  KEY `user` (`user`),
  +  CONSTRAINT `jobhistory_ibfk_1` FOREIGN KEY (`study`) REFERENCES `study` (`name`),
  +  CONSTRAINT `jobhistory_ibfk_2` FOREIGN KEY (`user`) REFERENCES `USERS` (`EMAIL`)
  +) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `samplecollection`
  +--
  +
  +DROP TABLE IF EXISTS `samplecollection`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `samplecollection` (
  +  `id` varchar(255) NOT NULL,
  +  `acronym` varchar(1024) NOT NULL,
  +  `name` varchar(1024) NOT NULL,
  +  `description` varchar(2000) DEFAULT NULL,
  +  `contact` varchar(255) NOT NULL,
  +  PRIMARY KEY (`id`),
  +  KEY `contact` (`contact`),
  +  CONSTRAINT `samplecollection_ibfk_1` FOREIGN KEY (`contact`) REFERENCES `USERS` (`EMAIL`)
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `study`
  +--
  +
  +DROP TABLE IF EXISTS `study`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `study` (
  +  `name` varchar(128) NOT NULL,
  +  `username` varchar(255) NOT NULL,
  +  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  +  PRIMARY KEY (`name`),
  +  UNIQUE KEY `name` (`name`),
  +  KEY `fk_study_users` (`username`),
  +  CONSTRAINT `fk_study_users` FOREIGN KEY (`username`) REFERENCES `USERS` (`EMAIL`) ON DELETE CASCADE
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `study_group_members`
  +--
  +
  +DROP TABLE IF EXISTS `study_group_members`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `study_group_members` (
  +  `studyname` varchar(255) NOT NULL,
  +  `username` varchar(255) NOT NULL,
  +  `timeadded` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  +  `added_by` varchar(255) NOT NULL,
  +  `team_role` enum('Master','Researcher','Guest') NOT NULL,
  +  PRIMARY KEY (`studyname`,`username`),
  +  CONSTRAINT `FK_study_group_members_studyname` FOREIGN KEY (`studyname`) REFERENCES `study` (`name`),
  +  CONSTRAINT `fk_study_members` FOREIGN KEY (`studyname`) REFERENCES `study` (`name`)
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +--
  +-- Table structure for table `study_services`
  +--
  +
  +DROP TABLE IF EXISTS `study_services`;
  +/*!40101 SET @saved_cs_client     = @@character_set_client */;
  +/*!40101 SET character_set_client = utf8 */;
  +CREATE TABLE `study_services` (
  +  `study` varchar(128) NOT NULL,
  +  `service` enum('CUNEIFORM','FLINK','SAMPLES','STUDY_INFO','SPARK','ADAM','MAPREDUCE','YARN') NOT NULL DEFAULT 'CUNEIFORM',
  +  PRIMARY KEY (`study`,`service`),
  +  CONSTRAINT `study_services_ibfk_1` FOREIGN KEY (`study`) REFERENCES `study` (`name`) ON DELETE CASCADE
  +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  +/*!40101 SET character_set_client = @saved_cs_client */;
  +
  +
  +
  +LOCK TABLES `USERS` WRITE;
  +/*!40000 ALTER TABLE `USERS` DISABLE KEYS */;
  +INSERT INTO `USERS` VALUES ('admin','33','Administrator','61646D696E','2013-09-26 12:51:52','xx','admin'),('kthfsagent@sics.se','0','KTHFS Agent','6B746866736167656E74','2013-02-08 15:49:01','xx','kthfsagent');
  +/*!40000 ALTER TABLE `USERS` ENABLE KEYS */;
  +UNLOCK TABLES;
  +
  +
  +LOCK TABLES `USERS_GROUPS` WRITE;
  +/*!40000 ALTER TABLE `USERS_GROUPS` DISABLE KEYS */;
  +INSERT INTO `USERS_GROUPS` VALUES ('admin','ADMIN'),('kthfsagent@sics.se','AGENT');
  +/*!40000 ALTER TABLE `USERS_GROUPS` ENABLE KEYS */;
  +UNLOCK TABLES;
  +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  +
  +/*!50001 DROP VIEW IF EXISTS `StudyDetails`*/;
   /*!50001 SET @saved_cs_client          = @@character_set_client */;
   /*!50001 SET @saved_cs_results         = @@character_set_results */;
   /*!50001 SET @saved_col_connection     = @@collation_connection */;
  
positive.code: /*!50001 SET collation_connection      = utf8_general_ci */;
  /*!50001 CREATE ALGORITHM=UNDEFINED */
  /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
  /*!50001 VIEW `v_People_Group` AS select `u`.`username` AS `username`,`u`.`password` AS `password`,`u`.`secret` AS `secret`,`u`.`email` AS `email`,`g`.`group_name` AS `group_name` from ((`People_Group` `ug` join `People` `u` on((`u`.`uid` = `ug`.`uid`))) join `Group` `g` on((`g`.`gid` = `ug`.`gid`))) */;
  /*!50001 SET character_set_client      = @saved_cs_client */;
  /*!50001 SET character_set_results     = @saved_cs_results */;
  /*!50001 SET collation_connection      = @saved_col_connection */;
  /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  
  /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  
  
negative.code: -- MySQL dump 10.13  Distrib 5.6.22, for Linux (x86_64)
  --
  -- Host: localhost    Database: kthfs
  -- ------------------------------------------------------
  -- Server version	5.6.22
  
  /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  