/*
SQLyog Ultimate v13.1.5  (64 bit)
MySQL - 5.6.35 : Database - workbench
*********************************************************************
*/

/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*Table structure for table `crop_persons` */

DROP TABLE IF EXISTS `crop_persons`;

CREATE TABLE `crop_persons` (
  `crop_name` varchar(32) NOT NULL,
  `personid` int(11) NOT NULL,
  PRIMARY KEY (`crop_name`,`personid`),
  KEY `crop_persons_fk_person` (`personid`),
  CONSTRAINT `crop_persons_fk_crop` FOREIGN KEY (`crop_name`) REFERENCES `workbench_crop` (`crop_name`) ON DELETE CASCADE,
  CONSTRAINT `crop_persons_fk_person` FOREIGN KEY (`personid`) REFERENCES `persons` (`personid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `crop_persons` */

LOCK TABLES `crop_persons` WRITE;

insert  into `crop_persons`(`crop_name`,`personid`) values 
('rice',1001),
('tutorial1',1001),
('rice',1002),
('tutorial1',1002);

UNLOCK TABLES;

/*Table structure for table `databasechangelog` */

DROP TABLE IF EXISTS `databasechangelog`;

CREATE TABLE `databasechangelog` (
  `ID` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `AUTHOR` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `FILENAME` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `DATEEXECUTED` datetime NOT NULL,
  `ORDEREXECUTED` int(11) NOT NULL,
  `EXECTYPE` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `MD5SUM` varchar(35) COLLATE utf8_unicode_ci DEFAULT NULL,
  `DESCRIPTION` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `COMMENTS` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `TAG` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `LIQUIBASE` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CONTEXTS` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `LABELS` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `DEPLOYMENT_ID` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `databasechangelog` */

LOCK TABLES `databasechangelog` WRITE;

insert  into `databasechangelog`(`ID`,`AUTHOR`,`FILENAME`,`DATEEXECUTED`,`ORDEREXECUTED`,`EXECTYPE`,`MD5SUM`,`DESCRIPTION`,`COMMENTS`,`TAG`,`LIQUIBASE`,`CONTEXTS`,`LABELS`,`DEPLOYMENT_ID`) values 
('beta9-1','danv','classpath:liquibase/workbench_changelog/4_0_0_BETA_09.xml','2020-03-27 11:31:52',1,'MARK_RAN','8:95b7fe75ff377645a5f9769ea94bcad0','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta12-1','danv','classpath:liquibase/workbench_changelog/4_0_0_BETA_12.xml','2020-03-27 11:31:52',2,'MARK_RAN','8:5fbefccbcb0188161905405df0b84f3c','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta12-2','danv','classpath:liquibase/workbench_changelog/4_0_0_BETA_12.xml','2020-03-27 11:31:52',3,'MARK_RAN','8:b7c82e5b0188979eef771c6b037553f1','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta12-3','danv','classpath:liquibase/workbench_changelog/4_0_0_BETA_12.xml','2020-03-27 11:31:52',4,'MARK_RAN','8:c15aa6778b6819e9178ac3dfd4792b69','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta12-4','iryna','classpath:liquibase/workbench_changelog/4_0_0_BETA_12.xml','2020-03-27 11:31:52',5,'EXECUTED','8:4deea53dc8431cab22220bc40ddae0c4','dropIndex indexName=uk_project_name, tableName=workbench_project','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta12-5','iryna','classpath:liquibase/workbench_changelog/4_0_0_BETA_12.xml','2020-03-27 11:31:52',6,'EXECUTED','8:9da078df754efe3cd72771c0374fa2ec','addUniqueConstraint constraintName=uk_project_name, tableName=workbench_project','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta12-6','iryna','classpath:liquibase/workbench_changelog/4_0_0_BETA_12.xml','2020-03-27 11:31:52',7,'MARK_RAN','8:5e4f16f6de71dfb3ba321323ca6d46c1','dropTable tableName=workbench_project_backup','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta14-1','abhishekptl','classpath:liquibase/workbench_changelog/4_0_0_BETA_14.xml','2020-03-27 11:31:52',8,'EXECUTED','8:62114635958c6dba25c2e8d689147bb3','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta15-1','chavdahard','classpath:liquibase/workbench_changelog/4_0_0_BETA_15.xml','2020-03-27 11:31:52',9,'EXECUTED','8:494d7bc5141c4004a6c52ce2a2f6d747','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta15-2','chavdahard','classpath:liquibase/workbench_changelog/4_0_0_BETA_15.xml','2020-03-27 11:31:52',10,'EXECUTED','8:240a17fc0250d9465d76046ebab3aeef','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta15-3','chavdahard','classpath:liquibase/workbench_changelog/4_0_0_BETA_15.xml','2020-03-27 11:31:52',11,'EXECUTED','8:3d58b377782ca1cf766049260a4bfd33','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta15-4','chavdahard','classpath:liquibase/workbench_changelog/4_0_0_BETA_15.xml','2020-03-27 11:31:52',12,'EXECUTED','8:89af231c563d384fcc20b968ea7dd337','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta15-5','chavdahard','classpath:liquibase/workbench_changelog/4_0_0_BETA_15.xml','2020-03-27 11:31:52',13,'EXECUTED','8:a9ee44492e2801c8c554178ce99a82cc','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta15-6','chavdahard','classpath:liquibase/workbench_changelog/4_0_0_BETA_15.xml','2020-03-27 11:31:52',14,'EXECUTED','8:1adec15561a8049aeae1ed256333c4ff','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta15-7','chavdahard','classpath:liquibase/workbench_changelog/4_0_0_BETA_15.xml','2020-03-27 11:31:52',15,'EXECUTED','8:0b01a999a5a4d9eb97b0b2a8caa40d91','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta16-1','maeisabelle','classpath:liquibase/workbench_changelog/4_0_0_BETA_16.xml','2020-03-27 11:31:52',16,'EXECUTED','8:b32e437e46c6837d8dac10809ca5ae06','createTable tableName=workbench_tool_license_info','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta16-2','maeisabelle','classpath:liquibase/workbench_changelog/4_0_0_BETA_16.xml','2020-03-27 11:31:52',17,'EXECUTED','8:5e8f1b8143c83b07e10993299b0b8848','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta16-3','darla','classpath:liquibase/workbench_changelog/4_0_0_BETA_16.xml','2020-03-27 11:31:52',18,'MARK_RAN','8:81f41cc8a9be0777c36079efbb9b9ca9','addUniqueConstraint constraintName=persons_uc1, tableName=persons','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta17-1','mderamos','classpath:liquibase/workbench_changelog/4_0_0_BETA_17.xml','2020-03-27 11:31:52',19,'MARK_RAN','8:5bfdb7c0aa7093df4c62794099a0bbd1','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta17-2','mderamos','classpath:liquibase/workbench_changelog/4_0_0_BETA_17.xml','2020-03-27 11:31:52',20,'MARK_RAN','8:7bb664ba934b3ce42051bb49f41a6554','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta17-3','mderamos','classpath:liquibase/workbench_changelog/4_0_0_BETA_17.xml','2020-03-27 11:31:52',21,'MARK_RAN','8:76a3eaaa0b2e5b5c677a00d7f633711f','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta17-4','mderamos','classpath:liquibase/workbench_changelog/4_0_0_BETA_17.xml','2020-03-27 11:31:52',22,'MARK_RAN','8:61b8183d186e7bdd30337b76e9110f51','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta17-5','mderamos','classpath:liquibase/workbench_changelog/4_0_0_BETA_17.xml','2020-03-27 11:31:52',23,'MARK_RAN','8:2a63b379ac38b7229769e92513e5bbc5','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta17-6','mderamos','classpath:liquibase/workbench_changelog/4_0_0_BETA_17.xml','2020-03-27 11:31:52',24,'MARK_RAN','8:22830ded66186cccbde090ea211a16e5','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta17-7','mderamos','classpath:liquibase/workbench_changelog/4_0_0_BETA_17.xml','2020-03-27 11:31:52',25,'MARK_RAN','8:73b03afb2a5d9223f7c4d04a848e1234','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta17-8','mderamos','classpath:liquibase/workbench_changelog/4_0_0_BETA_17.xml','2020-03-27 11:31:52',26,'MARK_RAN','8:17e45ba70bf230c0b1398f683f231dd1','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta17-9','mderamos','classpath:liquibase/workbench_changelog/4_0_0_BETA_17.xml','2020-03-27 11:31:52',27,'MARK_RAN','8:3e3a4523fcb82e4241757bd8fdddac61','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta1-1','vanina','classpath:liquibase/workbench_changelog/5_0_0_BETA_01.xml','2020-09-30 15:36:57',180,'RERAN','8:b1d5bf16c141b0788227f1a224c5b992','addColumn tableName=workbench_crop','',NULL,'3.5.0',NULL,NULL,'1505417792'),
('beta1-2','vanina','classpath:liquibase/workbench_changelog/5_0_0_BETA_01.xml','2020-09-30 15:36:57',181,'RERAN','8:a87a57c48a1e58787b1f8036c591e9b0','sql','',NULL,'3.5.0',NULL,NULL,'1505417792'),
('beta1-3','vanina','classpath:liquibase/workbench_changelog/5_0_0_BETA_01.xml','2020-09-30 15:36:57',182,'RERAN','8:080ba706c09b8671afe2b12e644b09e7','sql','',NULL,'3.5.0',NULL,NULL,'1505417792'),
('beta2-1','aldrin','classpath:liquibase/workbench_changelog/5_0_0_BETA_02.xml','2020-03-27 11:31:52',31,'EXECUTED','8:c319c281fd4f0bc1d7035cbe35d839c4','dropTable tableName=workbench_tool_license_info','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta3-1','aldrin','classpath:liquibase/workbench_changelog/5_0_0_BETA_03.xml','2020-03-27 11:31:52',32,'MARK_RAN','8:b3e9b42438129824552d2fea68e33707','addUniqueConstraint constraintName=uk_project_uuid, tableName=workbench_project','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('beta3-2','mderamos','classpath:liquibase/workbench_changelog/5_0_0_BETA_03.xml','2020-03-27 11:31:52',33,'EXECUTED','8:3ebf2173ef3041fc366b72a58067d013','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v5beta4-1','darla','classpath:liquibase/workbench_changelog/5_0_0_BETA_04.xml','2020-03-27 11:31:52',34,'MARK_RAN','8:5e9b88324cb8aabff29895380d61e21f','dropTable tableName=workbench_project_user_mysql_account','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v5.2-1','mderamos','classpath:liquibase/workbench_changelog/5_2_0.xml','2020-03-27 11:31:52',35,'EXECUTED','8:c75e52563d43627f4a22aeeb866be302','sql','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-2','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',36,'EXECUTED','8:20c560963a6d904c3c97fbb6eff89ea9','dropForeignKeyConstraint baseTableName=workbench_project_user_role, constraintName=fk_project_user_role_1','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-3','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',37,'EXECUTED','8:b6274b0eafeafb25c2e4ed459f6127be','dropForeignKeyConstraint baseTableName=workbench_project_user_role, constraintName=fk_project_user_role_2','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-4','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',38,'EXECUTED','8:053004f8d313783b4f047b6ce5ba7904','dropTable tableName=workbench_role','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-5','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',39,'EXECUTED','8:dbc0261ca7e40ca14ad3eea2a2503505','dropTable tableName=workbench_project_workflow_step','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-6','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',40,'EXECUTED','8:557dd79f93a949d1a28a7f823c915e94','dropTable tableName=workbench_workflow_step_tool','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-7','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',41,'EXECUTED','8:1874fbd16d9dc41abc842021181e462a','dropTable tableName=workbench_workflow_template_step','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-8','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',42,'EXECUTED','8:f4ae4079327eba51531351a0b0b21f85','dropTable tableName=workbench_workflow_step','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-9','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',43,'EXECUTED','8:3baffa6e3d3656a0f63f395a0aa411de','dropTable tableName=workbench_workflow_template','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-10','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',44,'EXECUTED','8:e235899ee93a101385ccf3df474a25a4','dropTable tableName=workbench_dataset','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-11','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',45,'EXECUTED','8:00687ade18bd1c283efa736a7af4d6cb','dropTable tableName=workbench_tool_input','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-12','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',46,'EXECUTED','8:07699887ea44778d2941458bcbe4861c','dropTable tableName=workbench_tool_output','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-13','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',47,'EXECUTED','8:bb6e7786c08d068895370e13c24a1b4b','dropTable tableName=workbench_tool_transform','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-14','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',48,'EXECUTED','8:b75f4d8758ad565f75ab4ebf05364441','dropTable tableName=workbench_tool_config','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-15','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',49,'MARK_RAN','8:95ca0ecdd8c542f8b44c5a4d7727e901','dropTable tableName=workbench_tool_license_info','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-16','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',50,'EXECUTED','8:212fdb94900dab848807e0dfd08a9d31','dropTable tableName=workbench_runtime_data','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-17','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',51,'EXECUTED','8:819f9d8b92473a3cfff126e49e5cb196','dropTable tableName=workbench_security_question','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-18','darla','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',52,'EXECUTED','8:89eb91fb08aabc7268aa54c1af9eeb8c','dropTable tableName=schema_version','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.1.1-19','mderamos','classpath:liquibase/workbench_changelog/8_1_1.xml','2020-03-27 11:31:52',53,'EXECUTED','8:3347fe000129ea032bea8a09cec09a37','dropTable tableName=template_setting','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.2.0-1','darla','classpath:liquibase/workbench_changelog/8_2_0.xml','2020-03-27 11:31:52',54,'EXECUTED','8:f11cebb482dc54018a52b216812490e4','dropTable tableName=workbench_setting','',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.3.0-1','nahuel','classpath:liquibase/workbench_changelog/8_3_0.xml','2020-03-27 11:31:52',55,'EXECUTED','8:2c0383087b2a2137d34a16a6c12ae3ad','sql','Adding Manager Study',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.3.0-2','nahuel','classpath:liquibase/workbench_changelog/8_3_0.xml','2020-03-27 11:31:52',56,'EXECUTED','8:4c26323d4860cde495653c1498a10ce4','sql','Adding Manager Study',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.4.0-1','aldrin','classpath:liquibase/workbench_changelog/8_4_0.xml','2020-03-27 11:31:52',57,'EXECUTED','8:58c0fec77e16c0812e80fdb4b5e818c6','sql','Adding Manager Study',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.4.0-2','aldrin','classpath:liquibase/workbench_changelog/8_4_0.xml','2020-03-27 11:31:53',58,'EXECUTED','8:f75655f379067039a7e83fc0de719013','sql','Adding Manager Study',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v8.4.1-1','aldrin','classpath:liquibase/workbench_changelog/8_4_1.xml','2020-03-27 11:31:53',59,'EXECUTED','8:9900e31655662aadb8309e5baa33338a','sql','Adding Manager Study',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.1.0-1','nahuel','classpath:liquibase/workbench_changelog/9_1_0.xml','2020-03-27 11:31:53',60,'MARK_RAN','8:42c15a1c9aa2555c06b10becf1942210','sql','Add Sample Manager side menu',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.1.0-2','nahuel','classpath:liquibase/workbench_changelog/9_1_0.xml','2020-03-27 11:31:53',61,'EXECUTED','8:4c26323d4860cde495653c1498a10ce4','sql','Add Sample Manager side menu',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-1','cuenyad','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',62,'EXECUTED','8:640f75b3d691f292b2446a15bc3d3e28','sql','Removing Nursery and Trial Manager side menu',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-2','cuenyad','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',63,'EXECUTED','8:d7d3cf12ea3071916174c5ca57159b75','sql','Adding Manager Study',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-3','cuenyad','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',64,'EXECUTED','8:327248fffcc6606dfec964b5ceb38777','sql','Adding Manager Study',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-4','darla','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',65,'EXECUTED','8:918b0e1f3bebc6dc0c6291ae22724e05','sql','Create ROLE table with default values',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-5','darla','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',66,'EXECUTED','8:6e97610872a3dafa778143e1deeda220','sql','Add role_id column to users_role table and link values to role table',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-6','darla','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',67,'EXECUTED','8:f3752314965f27a00cd0c0a32f3a2074','addForeignKeyConstraint baseTableName=users_roles, constraintName=fk_user_role_id, referencedTableName=role','Add FK to users_role.role_id linking to role table',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-7','darla','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',68,'EXECUTED','8:91b4f07b6957633329c573e82d3d9000','dropColumn columnName=role, tableName=users_roles','Drop role column from users_role table',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-8','darla','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',69,'EXECUTED','8:a59f0375e8887099c28a1ed895ded0f0','sql','Add Program Administration tools',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-9','darla','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',70,'EXECUTED','8:460625006d241647f868709dcce85fd1','sql','Add Program Administration sidebar links',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-10','darla','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',71,'EXECUTED','8:8b7099b0b82a722d3c376eb77c6579e2','sql','Add Trait Donor Query sidebar link',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-11','darla','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',72,'EXECUTED','8:44adfbe046e288c052a4c8df47db6423','sql','Create workbench_sidebar_category_link_role table',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-12','darla','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',73,'EXECUTED','8:4d55144baaf0170faba5faaee57e9387','sql','Default configuration for sidebar links access per role',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-13','darla','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',74,'EXECUTED','8:ce14d872446a32b44e9b44f0706aa1e1','sql','Insert SUPERADMIN role',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-14','darla','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',75,'EXECUTED','8:b6e054a32b528106ce36e00fbbeee050','sql','Assign user with \"admin\" username SUPERADMIN role',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.2.0-15','darla','classpath:liquibase/workbench_changelog/9_2_0.xml','2020-03-27 11:31:53',76,'EXECUTED','8:06ba8a69514282efac874df267237aa3','sql','Configuration for sidebar links access for SUPERADMIN role',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.4.0-1','cuenyad','classpath:liquibase/workbench_changelog/9_4_0.xml','2020-03-27 11:31:53',77,'EXECUTED','8:9e7339b4a5abf72c2e37841b6be747b1','sql','Reordering Menu for Manage Samples and Studies',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v9.4.3-1','darla','classpath:liquibase/workbench_changelog/9_4_3.xml','2020-03-27 11:31:53',78,'EXECUTED','8:7f503d949eca58e030daea57854c8943','sql','Hide Trait Donor Query sidebar link',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v10.4.0-1','clarissa','classpath:liquibase/workbench_changelog/10_4_0.xml','2020-03-27 11:31:53',79,'EXECUTED','8:533c266a49d9439772ad984dad83d5d2','sql','Add metrics table if it doesn\'t exist yet',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v10.4.0-2','clarissa','classpath:liquibase/workbench_changelog/10_4_0.xml','2020-03-27 11:31:53',80,'MARK_RAN','8:b52e7af9c2d8bc29a205c970d36c64ce','sql','Add phenotypes column into metrics table if it doesn\'t exist yet',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v10.4.0-3','clarissa','classpath:liquibase/workbench_changelog/10_4_0.xml','2020-03-27 11:31:53',81,'MARK_RAN','8:90b6f6c6dadf72a44703d846f4ed37b4','sql','Add plots column into metrics table if it doesn\'t exist yet',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v10.4.0-4','clarissa','classpath:liquibase/workbench_changelog/10_4_0.xml','2020-03-27 11:31:53',82,'MARK_RAN','8:221a0e384a387a9a2d4f4ef3ea6fefff','sql','Drop getMetrics procedure',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v10.4.0-5','clarissa','classpath:liquibase/workbench_changelog/10_4_0.xml','2020-03-27 11:31:53',83,'EXECUTED','8:a4648e021903efaf74eeac3da951e592','sql','Create getMetrics procedure',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v10.4.1-1','marie','classpath:liquibase/workbench_changelog/10_4_1.xml','2020-03-27 11:31:53',84,'EXECUTED','8:9bb5856eb04bcbc03e3c8c348a109c57','sql','Change Trait Donor Query label to Weighted Multi-trait Query in sidebar menu',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v11.2.0-1','nahuel','classpath:liquibase/workbench_changelog/11_2_0.xml','2020-03-27 11:31:53',85,'EXECUTED','8:75dcaa74259990410a306e48fe82554c','update tableName=workbench_tool','Update Sample Manager URL - Add angular route hash',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v11.2.0-2','clarissa','classpath:liquibase/workbench_changelog/11_2_0.xml','2020-03-27 11:31:53',86,'EXECUTED','8:c560db962ff0cd502f6b2dd5072cd1a6','sql','Add nursery column into metrics table if it doesn\'t exist yet',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v11.2.0-3','clarissa','classpath:liquibase/workbench_changelog/11_2_0.xml','2020-03-27 11:31:53',87,'EXECUTED','8:4768b635c10095071c246153dacc4045','sql','Add trial column into metrics table if it doesn\'t exist yet',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v11.2.0-4','clarissa','classpath:liquibase/workbench_changelog/11_2_0.xml','2020-03-27 11:31:53',88,'EXECUTED','8:221a0e384a387a9a2d4f4ef3ea6fefff','sql','Drop getMetrics procedure to update with modified version',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v11.2.0-5','clarissa','classpath:liquibase/workbench_changelog/11_2_0.xml','2020-03-27 11:31:53',89,'EXECUTED','8:c2e45b3c03399032a44a401a9864dc6e','sql','Re-create getMetrics procedure',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v11.4.0-1','darla','classpath:liquibase/workbench_changelog/11_4_0.xml','2020-03-27 11:31:53',90,'EXECUTED','8:85e72abc28420d9221a3aba4a9afad07','addColumn tableName=workbench_crop','Add use_uuid field in workbench_crop table for specifying whether to use UUIDs for observation unit IDs',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v11.4.2-1','vanina','classpath:liquibase/workbench_changelog/11_4_2.xml','2020-03-27 11:31:53',91,'EXECUTED','8:b99a8dcfa8672fe50f0769f0d0d9083d','sql','Change Trait Donor Query label to Multi-trait Query in sidebar menu',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v11.4.3-1','darla','classpath:liquibase/workbench_changelog/11_4_3.xml','2020-03-27 11:31:53',92,'EXECUTED','8:d55498b1b841a1c060760f1cc61b9e43','sql','Show Multi-trait Query tool in sidebar for roles who do not have it configured to be visible yet',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.1.0-1','nahuel','classpath:liquibase/workbench_changelog/12_1_0.xml','2020-03-27 11:31:53',93,'EXECUTED','8:ef846c56ff5592e8e23a3d88497c0e52','createTable tableName=users_crops','Add users_crops table to enhance permission management im BMS',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.1.0-3','nahuel','classpath:liquibase/workbench_changelog/12_1_0.xml','2020-03-27 11:31:53',94,'MARK_RAN','8:98af808ac4ce7add853321bdf4fc7337','sql','Associate all program users to the corresponding crop',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.2.0-1','nahuel','classpath:liquibase/workbench_changelog/12_2_0.xml','2020-03-27 11:31:53',95,'MARK_RAN','8:bd1cf888cc08ec37b898b3ec0520c7bb','sql','Delete about_bms from workbench_sidebar_category_link_role',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.2.0-2','nahuel','classpath:liquibase/workbench_changelog/12_2_0.xml','2020-03-27 11:31:53',96,'EXECUTED','8:14a1e920e40a1f608d68ce365260fbb8','sql','Delete about_bms from workbench_sidebar_category_link',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.2.0-3','nahuel','classpath:liquibase/workbench_changelog/12_2_0.xml','2020-03-27 11:31:53',97,'EXECUTED','8:035a35172618fc8ec728eaa3e32de72e','sql','Delete about_bms from workbench_tool',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.4.0-1','darla','classpath:liquibase/workbench_changelog/12_4_0.xml','2020-03-27 11:31:53',98,'EXECUTED','8:2626a51f139f5fe27fa9e67fbc382b6e','sql','Store into backup table the WORKBENCH_IBDB_USER_MAP table, then drop the WORKBENCH_IBDB_USER_MAP table.',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.4.0-2','darla','classpath:liquibase/workbench_changelog/12_4_0.xml','2020-03-27 11:31:53',99,'EXECUTED','8:f01d031c286f479ed3b25a2e0110555b','sql','Create CROP_PERSONS table for storing association between crop and persons',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.4.0-3','darla','classpath:liquibase/workbench_changelog/12_4_0.xml','2020-03-27 11:31:53',100,'EXECUTED','8:a8455735be1ed9756d7f853ef6014897','dropTable tableName=workbench_project_user_role','Delete unused table \"workbench_project_user_role\"',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-1','nahuel','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',101,'EXECUTED','8:e6c7b63b66c848b77b663e9b108ae2e0','sql','migrate data from users_crops to crop_persons',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-2','nahuel','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-09-30 15:36:57',183,'RERAN','8:4e905cac9fe27f416e80f6391617907d','sql','Associate all superadmins to every crop',NULL,'3.5.0',NULL,NULL,'1505417792'),
('v12.5.0-3','nahuel','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',103,'MARK_RAN','8:13da0a150d327eed5002dd75a99eb1d0','sql','Drop obsolete migration procedure assignCropsToSuperAdmin replace with changeset 12.5.0-2',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-0','clarysabel','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',104,'EXECUTED','8:fc16ea4ebcbf28527eecc2ba85f3d74f','sql','Backup users_roles table before migration, including role name since it can be edited after 12.5 release',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-1','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',105,'EXECUTED','8:40664962a084b6688ce5bd2b427eeef2','sql','Alter table users_roles to add crop_name',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-2','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',106,'EXECUTED','8:1ca0fd860a038744849bce26c53febb6','sql','Alter table users_roles to add workbench_project_id',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-3','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',107,'EXECUTED','8:43e8e2060294df4db06436241488fe09','sql','Alter table users_roles to add created_by',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-4','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',108,'EXECUTED','8:9eb74290e4650ced52734a5881bff253','sql','Alter table users_roles to add created_date, doing a separate sentence to add a default value so old rows keep null value for created_date',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-5','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',109,'EXECUTED','8:2804fa8d4175ec67b51ab54fbe195d74','sql','Create table role_type',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-6','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',110,'EXECUTED','8:be595a28d20f4cf1e07ed4f6295d3368','sql','Alter table role to changing name by description',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-7','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',111,'EXECUTED','8:74f21c074d8df702971191489cea243d','sql','Alter table role to add description',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-8','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',112,'EXECUTED','8:4b329182d4042444660d9e374dc624bc','sql','Alter table role to add role_type_id. Role super admin will become INSTANCE ROLE type, Roles Breeder, Technician, Admin and ReadOnly will become PROGRAM ROLE type. Admin\n			role will be renamed to ProgramAdmin',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-9','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',113,'EXECUTED','8:bd9560df5a523fb454be7fc75786a849','sql','Alter table role to add active column',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-10','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:53',114,'EXECUTED','8:38d55d4a052c333906129dae862dd4bb','sql','Alter table role to add editable column',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-11','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',115,'EXECUTED','8:cfdfdb6c81d8f606971800a18dcaf345','sql','Alter table role to add active column',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-12','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',116,'EXECUTED','8:e71c7d44c4ebc6cd01542e3502931ab2','sql','Alter table role to add created_by column',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-13','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',117,'EXECUTED','8:f4562d13fee85c86fb68bd229979a066','sql','Alter table role to add created_date column, old values should keep NULL value since we dont know when they were created',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-14','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',118,'EXECUTED','8:be0467b800bde7f29705208c4294dd3a','sql','Alter table role to add updated_by column',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-15','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',119,'EXECUTED','8:531671c7478301ada89c230e78c9bb6e','sql','Alter table role to add updated_date column',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-16','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',120,'EXECUTED','8:53748568120eece8864f5a70991c5e76','sql','Create table permission',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-17','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',121,'EXECUTED','8:5ad7369a10202b3c19f34acc5c726a36','sql','Create table role_permission',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-18','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',122,'EXECUTED','8:cdefe482f49ac45d4e7a7ee85413ff0e','sql','Create table role_type_permission',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-19','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',123,'EXECUTED','8:b66c73d4d9e01d6b41f1ba65e820a5c3','sql','INSERT INTO table permission',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-20','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',124,'EXECUTED','8:2866512b5044c7719e33a4b026a7ae79','sql','INSERT INTO table role_type_permission',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-21','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',125,'EXECUTED','8:7caac65143eb11e8bc9a32adb10ed312','sql','INSERT INTO table role_permission',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-22','vanina','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',126,'EXECUTED','8:55c04e4893a3867b7e2e8373d39a9a92','sql','Update table role where row is SUPERADMIN, so this role becomes not editable and not assignable',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-24','clarysabel','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',127,'MARK_RAN','8:ca4911d7b074028ae35bf8cb9ce8d3dd','sql','Associate the breeder, technician, program admin and readonly roles to the crop and programs which user is member of, given that they are program roles',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v12.5.0-25','nahuel','classpath:liquibase/workbench_changelog/12_5_0.xml','2020-03-27 11:31:54',128,'EXECUTED','8:5e993932f1f7f7d90bc28aab5900260c','dropTable tableName=users_crops','Delete obsolete table users_crops after migrating the data to crop_persons',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v13.3.0-1','aldrin','classpath:liquibase/workbench_changelog/13_3_0.xml','2020-03-27 11:31:54',129,'EXECUTED','8:741e2e52e53d6a77edb2769a390c9166','sql','Create table r_package',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v13.3.0-2','aldrin','classpath:liquibase/workbench_changelog/13_3_0.xml','2020-03-27 11:31:54',130,'EXECUTED','8:f6c66c59d5589bfa86a3e5068073662b','sql','Create table r_call',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v13.3.0-3','aldrin','classpath:liquibase/workbench_changelog/13_3_0.xml','2020-03-27 11:31:54',131,'EXECUTED','8:cc5452a12c70c725a1bfb73f2bab9b44','sql','Create table r_call_parameter',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v13.4.0-1','aldrin','classpath:liquibase/workbench_changelog/13_4_0.xml','2020-03-27 11:31:54',132,'EXECUTED','8:4e54cac872e39868dd361aba9b5c4298','sql','Insert records in r_package, r_call and r_call_parameter necessary for creating plot graph.',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v13.4.1-1','corina','classpath:liquibase/workbench_changelog/13_4_1.xml','2020-03-27 11:31:54',133,'EXECUTED','8:abd75cba5d69bcb5eaf9e984981c9bc0','sql','Make Manage Ontologies,Import Germplasm,Manage Genotyping visible for program role. IBP-1345',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v13.4.1-2','aldrin','classpath:liquibase/workbench_changelog/13_4_1.xml','2020-03-27 11:31:54',134,'EXECUTED','8:8bdbdb99565f066fdfcc602cc53119e5','sql','Change the shipped OpenCPU dataset transformations.',NULL,'3.5.0',NULL,NULL,'5333912370'),
('v14.1.0-1','diego','classpath:liquibase/workbench_changelog/14_1_0.xml','2020-05-15 08:11:00',139,'EXECUTED','8:77efa8e58b96599cb52cf6e78048d6e8','sql','Add Inventory Manager side menu',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.1.0-2','diego','classpath:liquibase/workbench_changelog/14_1_0.xml','2020-05-15 08:11:00',140,'EXECUTED','8:bf0d011cb50b7810afe9e156d1258462','sql','Add Inventory Manager side menu',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.1.0-3','diego','classpath:liquibase/workbench_changelog/14_1_0.xml','2020-05-15 08:11:00',141,'EXECUTED','8:87d32f1b2ca14e6599d35e384496362b','sql','Add Inventory Manager side Item menu',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.1.0-4','diego','classpath:liquibase/workbench_changelog/14_1_0.xml','2020-05-15 08:11:00',142,'EXECUTED','8:35f4119b59f0adfe763beba926e52c40','sql','INSERT INTO table permission for MANAGE_INVENTORY',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.1.0-5','diego','classpath:liquibase/workbench_changelog/14_1_0.xml','2020-05-15 08:11:00',143,'EXECUTED','8:6aafe2c7469c3b17ac0b2e7fbdbcc88f','sql','INSERT INTO table role_type_permission',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.1.0-6','gelli','classpath:liquibase/workbench_changelog/14_1_0.xml','2020-05-15 08:11:00',144,'EXECUTED','8:bb202fb6965cc6ba1caf0138c5e7477d','sql','Drop Table workbench_ibdb_user_map_bkp if exists.',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.1.0-7','vanina','classpath:liquibase/workbench_changelog/14_1_0.xml','2020-05-15 08:11:00',145,'EXECUTED','8:63af9ca3b418c38e1014d57755867b46','sql','Remove unused table migration_identity_map',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.1.0-8','vanina','classpath:liquibase/workbench_changelog/14_1_0.xml','2020-05-15 08:11:00',146,'EXECUTED','8:8b6773fbcbef818d6901c4c30e98e76f','sql','Remove unused table migration_report',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.1.0-9','vanina','classpath:liquibase/workbench_changelog/14_1_0.xml','2020-05-15 08:11:00',147,'EXECUTED','8:7f03355b06253dd24b5c52a375c58b97','sql','Remove unused table migration_status',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.1.0-10','vanina','classpath:liquibase/workbench_changelog/14_1_0.xml','2020-05-15 08:11:00',148,'EXECUTED','8:8cf92e79abce9d7def984ff35ed85cfd','sql','Remove unused table users_roles_bkp',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.2.0-1','nahuel','classpath:liquibase/workbench_changelog/14_2_0.xml','2020-05-15 08:11:00',149,'EXECUTED','8:ec48274932f6e97ae39a6635e5cbaadb','sql','MANAGE_INVENTORY granular permissions',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.2.0-1','clarysabel','classpath:liquibase/workbench_changelog/14_2_0.xml','2020-05-15 08:11:00',150,'EXECUTED','8:af749a3c0da5b0686104c429dcf66809','sql','WITHDRAW_INVENTORY granular permissions',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.2.0-2','nahuel','classpath:liquibase/workbench_changelog/14_2_0.xml','2020-05-15 08:11:00',151,'EXECUTED','8:d7157211317e326918ebd9752928a5c1','sql','Remove link from some permissions. Explicit VIEW permission are needed now to access IM',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.3.0-1','cuenyad','classpath:liquibase/workbench_changelog/14_3_0.xml','2020-05-15 08:11:00',152,'EXECUTED','8:f82c8c73bc3f1e705496afc8f5fa7b2e','sql','CONFIRM_TRANSACTIONS in MANAGE_TRANSACTIONS granular permissions',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.3.0-1','nahuel','classpath:liquibase/workbench_changelog/14_3_0.xml','2020-05-15 08:11:00',153,'EXECUTED','8:9caad8e5efb66aa0c19fa3e0795be1e8','sql','Update Lot permissions',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.3.0-1','clarysabel','classpath:liquibase/workbench_changelog/14_3_0.xml','2020-05-15 08:11:00',154,'EXECUTED','8:46744c663cedceebd8d61dc1d2a30675','sql','Create permission to update pending transactions',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.4.0-1','clarysabel','classpath:liquibase/workbench_changelog/14_4_0.xml','2020-05-15 08:11:00',155,'EXECUTED','8:8b771c7d51d515f3a45180c312a53e03','sql','DEPOSIT_INVENTORY granular permissions',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.4.0-2','cuenyad','classpath:liquibase/workbench_changelog/14_4_0.xml','2020-05-15 08:11:00',156,'EXECUTED','8:72f8bb1462b3d6cb212dece3701a6576','sql','Create permission to cancel pending transactions',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.4.0-3','nahuel','classpath:liquibase/workbench_changelog/14_4_0.xml','2020-05-15 08:11:00',157,'EXECUTED','8:4f37b3760a1b5df3fae79d012fa398b8','sql','Lot \"Export data and labels\" granular permissions',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v14.4.1-1','cuenyad','classpath:liquibase/workbench_changelog/14_4_1.xml','2020-05-15 08:11:00',158,'EXECUTED','8:a879e2872babd46444004160833d8516','sql','Close Lots permissions',NULL,'3.6.1',NULL,NULL,'9555460393'),
('v15.1.0-1','clarysabel','classpath:liquibase/workbench_changelog/15_1_0.xml','2020-09-09 09:06:30',163,'EXECUTED','8:4a115a3c3f4e3b2b0d13bf3617244804','sql','Create first granular permissions for Manage studies: Withdraw Inventory for Program Role Type',NULL,'3.6.1',NULL,NULL,'9667590345'),
('v15.2.0-1','darla','classpath:liquibase/workbench_changelog/15_2_0.xml','2020-09-09 09:06:30',164,'EXECUTED','8:244333887d216fbf79b5bb3200947335','sql','Update path of Breeding Manager tools to point to Workbench app',NULL,'3.6.1',NULL,NULL,'9667590345'),
('v15.3.0-1','nahuel','classpath:liquibase/workbench_changelog/15_3_0.xml','2020-09-09 09:06:30',165,'EXECUTED','8:65a87f543e400e3660080ee03b94111a','sql','Manage Germplasm first granular permission: create inventory lots',NULL,'3.6.1',NULL,NULL,'9667590345'),
('v15.4.0-1','cuenyad','classpath:liquibase/workbench_changelog/15_4_0.xml','2020-09-09 09:06:30',166,'EXECUTED','8:beab809e4cc7a5deb5cb4be4982e72d6','sql','Rename update pending transactions permission by import transaction updates',NULL,'3.6.1',NULL,NULL,'9667590345'),
('v15.4.0-2','aldrin','classpath:liquibase/workbench_changelog/15_4_0.xml','2020-09-09 09:06:30',167,'EXECUTED','8:7a602aaea9d91e6fa556d807c2c5c1d0','sql','Create granular permissions for Manage studies: Create Lots',NULL,'3.6.1',NULL,NULL,'9667590345'),
('v15.4.0-2','clarysabel','classpath:liquibase/workbench_changelog/15_4_0.xml','2020-09-09 09:06:30',168,'EXECUTED','8:2930f415701ee56d590207e118248bed','sql','Add new permission to update lot balance',NULL,'3.6.1',NULL,NULL,'9667590345'),
('v15.4.0-3','darla','classpath:liquibase/workbench_changelog/15_4_0.xml','2020-09-09 09:06:30',169,'EXECUTED','8:41bb0443dbf692e45ddaeffc02f13b08','sql','Update OpenCPU packages to use IBP AWS instance',NULL,'3.6.1',NULL,NULL,'9667590345'),
('v15.4.0-1','nahuel','classpath:liquibase/workbench_changelog/15_4_0.xml','2020-09-09 09:06:30',170,'EXECUTED','8:79674279df44e9bcf6820979caee0709','sql','Move Graphical filtering and Study Comparison tools to a new \"Graphical Queries\" sub-menu',NULL,'3.6.1',NULL,NULL,'9667590345'),
('v15.4.1-1','aldrin','classpath:liquibase/workbench_changelog/15_4_1.xml','2020-09-09 09:06:30',171,'EXECUTED','8:a402f4c8264440769a2a29bbafb002b8','sql','Add new permssion to cancel pending transactions',NULL,'3.6.1',NULL,NULL,'9667590345');

UNLOCK TABLES;

/*Table structure for table `databasechangeloglock` */

DROP TABLE IF EXISTS `databasechangeloglock`;

CREATE TABLE `databasechangeloglock` (
  `ID` int(11) NOT NULL,
  `LOCKED` bit(1) NOT NULL,
  `LOCKGRANTED` datetime DEFAULT NULL,
  `LOCKEDBY` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `databasechangeloglock` */

LOCK TABLES `databasechangeloglock` WRITE;

insert  into `databasechangeloglock`(`ID`,`LOCKED`,`LOCKGRANTED`,`LOCKEDBY`) values 
(1,'\0',NULL,NULL);

UNLOCK TABLES;

/*Table structure for table `metrics` */

DROP TABLE IF EXISTS `metrics`;

CREATE TABLE `metrics` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `crop_name` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `program` int(11) DEFAULT NULL,
  `user` int(11) DEFAULT NULL,
  `germplasm` int(11) DEFAULT NULL,
  `delGermplasm` int(11) DEFAULT NULL,
  `study` int(11) DEFAULT NULL,
  `delStudy` int(11) DEFAULT NULL,
  `nursery` int(11) DEFAULT NULL,
  `trial` int(11) DEFAULT NULL,
  `phenotypes` int(11) DEFAULT NULL,
  `plots` int(11) DEFAULT NULL,
  `list` int(11) DEFAULT NULL,
  `location` int(11) DEFAULT NULL,
  `newVariable` int(11) DEFAULT NULL,
  `lot` int(11) DEFAULT NULL,
  `gdmsDSet` int(11) DEFAULT NULL,
  `gdmsDSetEntries` int(11) DEFAULT NULL,
  `sample` int(11) DEFAULT NULL,
  `dateExec` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `metrics` */

LOCK TABLES `metrics` WRITE;

UNLOCK TABLES;

/*Table structure for table `permission` */

DROP TABLE IF EXISTS `permission`;

CREATE TABLE `permission` (
  `permission_id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `workbench_sidebar_category_link_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`permission_id`),
  KEY `fk_permission_1_idx` (`parent_id`),
  KEY `fk_permission_2_idx` (`workbench_sidebar_category_link_id`),
  CONSTRAINT `fk_permission_1` FOREIGN KEY (`parent_id`) REFERENCES `permission` (`permission_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_permission_2` FOREIGN KEY (`workbench_sidebar_category_link_id`) REFERENCES `workbench_sidebar_category_link` (`sidebar_category_link_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `permission` */

LOCK TABLES `permission` WRITE;

insert  into `permission`(`permission_id`,`name`,`description`,`parent_id`,`workbench_sidebar_category_link_id`) values 
(1,'ADMIN','Full',NULL,NULL),
(2,'ADMINISTRATION','Administration',1,NULL),
(3,'CROP_MANAGEMENT','Crop Management',1,NULL),
(4,'BREEDING_ACTIVITIES','Breeding Activities',1,NULL),
(5,'INFORMATION_MANAGEMENT','Information Management',1,NULL),
(6,'STATISTICAL_ANALYSIS','Statistical Analysis',1,NULL),
(7,'SITE_ADMIN','Site Admin',2,NULL),
(8,'MANAGE_ONTOLOGIES','Manage Ontologies',3,10),
(9,'IMPORT_GERMPLASM','Import Germplasm',3,5),
(10,'MANAGE_GENOTYPING_DATA','Manage Genotyping Data',3,6),
(11,'MANAGE_PROGRAMS','Manage programs',3,NULL),
(12,'ADD_PROGRAM','Add Program',11,NULL),
(13,'MANAGE_PROGRAM_SETTINGS','Manage Program Settings',11,24),
(14,'MANAGE_GERMPLASM','Manage Germplasm',4,1),
(15,'MANAGE_SAMPLES','Manage Samples',4,28),
(16,'MANAGE_STUDIES','Manage Studies',4,23),
(17,'BROWSE_STUDIES','Browse Studies',5,7),
(18,'HEAD_TO_HEAD_QUERY','Head to Head Query',5,8),
(19,'MULTI_TRAIT_QUERY','Multi-trait Query',5,27),
(20,'IMPORT_DATASETS','Import Datasets',5,19),
(21,'SINGLE_SITE_ANALYSIS','Single-Site Analysis',6,11),
(22,'MULTI_SITE_ANALYSIS','Multi-Site Analysis',6,12),
(23,'MANAGE_INVENTORY','Manage Inventory',3,29),
(24,'MANAGE_LOTS','Manage Lots',23,29),
(25,'VIEW_LOTS','View Lots',24,29),
(26,'CREATE_LOTS','Create Lots',24,NULL),
(27,'IMPORT_LOTS','Import Lots',24,NULL),
(28,'MANAGE_TRANSACTIONS','Manage Transactions',23,29),
(29,'WITHDRAW_INVENTORY','Withdraw Inventory',24,NULL),
(30,'CREATE_PENDING_WITHDRAWALS','Create Pending Withdrawals',29,NULL),
(31,'CREATE_CONFIRMED_WITHDRAWALS','Create Confirmed Withdrawals',29,NULL),
(32,'VIEW_TRANSACTIONS','View Transactions',28,29),
(33,'CONFIRM_TRANSACTIONS','Confirm Transactions',28,NULL),
(34,'UPDATE_LOTS','Update lots',24,NULL),
(35,'IMPORT_TRANSACTION_UPDATES','Import Transaction Updates',28,NULL),
(36,'DEPOSIT_INVENTORY','Deposit Inventory',24,NULL),
(37,'CREATE_PENDING_DEPOSITS','Create Pending Deposits',36,NULL),
(38,'CREATE_CONFIRMED_DEPOSITS','Create Confirmed Deposits',36,NULL),
(39,'CANCEL_PENDING_TRANSACTIONS','Cancel Pending Transactions',28,NULL),
(40,'LOT_LABEL_PRINTING','Export data and labels',24,NULL),
(41,'CLOSE_LOTS','Close Lots',24,NULL),
(42,'MS_MANAGE_OBSERVATION_UNITS','Manage Observation Units',16,23),
(43,'MS_WITHDRAW_INVENTORY','Withdraw Inventory',42,23),
(44,'MS_CREATE_PENDING_WITHDRAWALS','Create Pending Withdrawals',43,23),
(45,'MS_CREATE_CONFIRMED_WITHDRAWALS','Create Confirmed Withdrawals',43,23),
(46,'MG_MANAGE_INVENTORY','Manage Inventory',14,1),
(47,'MG_CREATE_LOTS','Create Lots',46,1),
(48,'MS_CREATE_LOTS','Create Lots',16,23),
(49,'UPDATE_LOT_BALANCE','Update Balance',24,NULL),
(50,'GRAPHICAL_QUERIES','Graphical Queries',5,30),
(51,'MS_CANCEL_PENDING_TRANSACTIONS','Cancel Pending Transactions',43,23);

UNLOCK TABLES;

/*Table structure for table `persons` */

DROP TABLE IF EXISTS `persons`;

CREATE TABLE `persons` (
  `personid` int(11) NOT NULL AUTO_INCREMENT,
  `fname` varchar(20) NOT NULL DEFAULT '-',
  `lname` varchar(50) NOT NULL DEFAULT '-',
  `ioname` varchar(15) NOT NULL DEFAULT '-',
  `institid` int(11) NOT NULL DEFAULT '0',
  `ptitle` varchar(25) NOT NULL DEFAULT '-',
  `poname` varchar(50) NOT NULL DEFAULT '-',
  `plangu` int(11) NOT NULL DEFAULT '0',
  `pphone` varchar(20) NOT NULL DEFAULT '-',
  `pextent` varchar(20) NOT NULL DEFAULT '-',
  `pfax` varchar(20) NOT NULL DEFAULT '-',
  `pemail` varchar(40) NOT NULL DEFAULT '-',
  `prole` int(11) NOT NULL DEFAULT '0',
  `sperson` int(11) NOT NULL DEFAULT '0',
  `eperson` int(11) NOT NULL DEFAULT '0',
  `pstatus` int(11) NOT NULL DEFAULT '0',
  `pnotes` varchar(255) NOT NULL DEFAULT '-',
  `contact` varchar(255) NOT NULL DEFAULT '-',
  PRIMARY KEY (`personid`),
  UNIQUE KEY `persons_uc1` (`pemail`),
  KEY `persons_idx01` (`institid`),
  KEY `persons_idx02` (`personid`)
) ENGINE=InnoDB AUTO_INCREMENT=1003 DEFAULT CHARSET=utf8;

/*Data for the table `persons` */

LOCK TABLES `persons` WRITE;

insert  into `persons`(`personid`,`fname`,`lname`,`ioname`,`institid`,`ptitle`,`poname`,`plangu`,`pphone`,`pextent`,`pfax`,`pemail`,`prole`,`sperson`,`eperson`,`pstatus`,`pnotes`,`contact`) values 
(1,'Paterno','Borlagdan','C',1001,'Assistant Scientist I','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','P.Borlagdan@cgiar.org',106,19920422,0,0,'-','-'),
(2,'Philip','Cedillo','B',1001,'Assistant Scientist I','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','P.Cedillo@cgiar.org',106,19910819,0,0,'-','-'),
(3,'Reynaldo','Billate','C',1001,'Researcher','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','R.Billate@cgiar.org',106,19980604,0,0,'-','-'),
(4,'Edna','Razote','B',1001,'Researcher','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','E.Razote@cgiar.org',106,19980512,0,0,'-','-'),
(5,'Maria Cristina','Jawili','E',1002,'Assistant Scientist I','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','M.Jawili@cgiar.org',106,19991018,0,0,'-','-'),
(6,'Legacy','User','-',0,'-','-',0,'-','-','-','lu@ibp.net',0,0,0,0,'-','-'),
(7,'Veritas Morena','Salazar','R',1006,'Researcher','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','V.Salazar@cgiar.org',106,19970519,0,0,'-','-'),
(8,'Ma. Rosalie','Lanceras','E',1013,'Researcher','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','M.Lanceras@cgiar.org',106,19871216,0,0,'-','-'),
(9,'Rhulyx','Mendoza','D',1013,'Assistant Scientist I','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','R.Mendoza@cgiar.org',106,19910301,0,0,'-','-'),
(10,'Jocelyn','Uichanco','V',1004,'Researcher','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','J.Uichanco@cgiar.org',106,19920817,0,0,'-','-'),
(11,'Chris','McLaren','G.',1002,'Head, Biometrics Unit','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','r.McLaren@cgiar.org',106,19930814,0,0,'-','-'),
(12,'EDILBERTO D.','REDOÑA','-',3288,'-','-',160,'-','-','-','REDOÑA1848@irri.org',160,0,0,0,'-','-'),
(13,'William ','Eusebio','-',0,'-','-',0,'-','-','-','Eusebio6002@irri.org',0,0,0,0,'-','-'),
(14,'Connie ','Lotho','-',0,'-','-',0,'-','-','-','Lotho6003@irri.org',0,0,0,0,'-','-'),
(15,'Rolando','So','B',1004,'Assistant Scientist I','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','R.So@cgiar.org',106,19841001,0,0,'-','-'),
(16,'Ruthchelle','Schaffer','J',1004,'Assistant Scientist I','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','R.Schaffer@cgiar.org',106,19950401,0,0,'-','-'),
(17,'Tom','Hazekamp','-',0,'-','-',0,'-','-','-','Hazekamp6004@irri.org',0,0,0,0,'-','-'),
(18,'Ma. Arlene','Adviento','A',1004,'Assistant Scientist I','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','M.Adviento@cgiar.org',106,19921001,0,0,'-','-'),
(19,'Romeo','Visperas','M',1004,'Sr. Associate Scientist','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','R.Visperas@cgiar.org',106,19690101,0,0,'-','-'),
(20,'Gregorio','Simbahan','C',1004,'Assistant Scientist II','-',160,'+63 (2) 845-0563','-','+63 (2) 891-1292','G.Simbahan@cgiar.org',106,19940930,0,0,'-','-'),
(21,'Grace','Serioso-Capilit','-',0,'-','-',0,'-','-','-','Serioso-Capilit6005@irri.org',0,0,0,0,'-','-'),
(22,'Victor','Alcantara','-',0,'-','-',0,'-','-','-','Alcantara6006@irri.org',0,0,0,0,'-','-'),
(23,'Janice','Bautista','-',0,'-','-',0,'-','-','-','Bautista6007@irri.org',0,0,0,0,'-','-'),
(24,'Luralyn','Ramos','-',0,'-','-',0,'-','-','-','Ramos6008@irri.org',0,0,0,0,'-','-'),
(25,'B.','Marasigan','-',0,'-','-',0,'-','-','-','Marasigan6009@irri.org',0,0,0,0,'-','-'),
(1001,'admin','admin','-',0,'-','-',0,'-','-','-','ibp1@mclarenmail.com',0,0,0,0,'-','-'),
(1002,'Christopher','McLaren','-',0,'-','-',0,'-','-','-','g.mclaren@integratedbreeding.net',0,0,0,0,'-','-');

UNLOCK TABLES;

/*Table structure for table `r_call` */

DROP TABLE IF EXISTS `r_call`;

CREATE TABLE `r_call` (
  `call_id` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(255) DEFAULT NULL,
  `package_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`call_id`),
  KEY `FK_package_id_idx` (`package_id`),
  CONSTRAINT `FK_package_id` FOREIGN KEY (`package_id`) REFERENCES `r_package` (`package_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

/*Data for the table `r_call` */

LOCK TABLES `r_call` WRITE;

insert  into `r_call`(`call_id`,`description`,`package_id`) values 
(3,'Melt data',2),
(4,'Scatterplot',3),
(5,'Histogram',3),
(6,'Boxplot',3),
(7,'None',1),
(8,'Overall average',1),
(9,'Average by instance',1),
(10,'Data over instances and reps (for replicated data only)',1);

UNLOCK TABLES;

/*Table structure for table `r_call_parameter` */

DROP TABLE IF EXISTS `r_call_parameter`;

CREATE TABLE `r_call_parameter` (
  `call_parameter_id` int(11) NOT NULL AUTO_INCREMENT,
  `parameter_key` varchar(45) DEFAULT NULL,
  `value` varchar(500) DEFAULT NULL,
  `call_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`call_parameter_id`),
  KEY `FK_rcall_idx` (`call_id`),
  CONSTRAINT `FK_rcall` FOREIGN KEY (`call_id`) REFERENCES `r_call` (`call_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;

/*Data for the table `r_call_parameter` */

LOCK TABLES `r_call_parameter` WRITE;

insert  into `r_call_parameter`(`call_parameter_id`,`parameter_key`,`value`,`call_id`) values 
(4,'id','c(\"instanceNumber\",\"blockNumber\",\"entryNumber\",\"entryType\",\"germplasmDbId\",\"germplasmName\",\"observationLevel\",\"observationLevels\",\"observationUnitDbId\",\"observationUnitName\",\"plantNumber\",\"plotNumber\",\"programName\",\"replicate\",\"studyDbId\",\"studyLocation\",\"studyLocationDbId\",\"studyName\",\"x\",\"y\")',3),
(5,'x',NULL,4),
(6,'y',NULL,4),
(7,'method',NULL,4),
(8,'geom','c(\"jitter\",\"smooth\")',4),
(9,'x',NULL,5),
(10,'binwidth','5',5),
(11,'geom','c(\"histogram\")',5),
(12,'col','I(\"white\")',5),
(13,'x',NULL,6),
(14,'y',NULL,6),
(15,'geom','c(\"boxplot\")',6),
(16,'na.rm','TRUE',3),
(17,'formula','studyName+observationLevel+observationUnitDbId+entryType+entryNumber+germplasmDbId+germplasmName+studyLocation~variable',7),
(18,'formula','germplasmDbId+germplasmName~variable',8),
(19,'fun.aggregate','mean',8),
(20,'formula','germplasmDbId+germplasmName~variable+studyName+studyLocation',9),
(21,'fun.aggregate','mean',9),
(22,'formula','germplasmDbId+germplasmName~variable+studyName+studyLocation+replicate',10),
(23,'fun.aggregate','mean',10);

UNLOCK TABLES;

/*Table structure for table `r_package` */

DROP TABLE IF EXISTS `r_package`;

CREATE TABLE `r_package` (
  `package_id` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(255) DEFAULT NULL,
  `endpoint` varchar(500) DEFAULT NULL,
  PRIMARY KEY (`package_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

/*Data for the table `r_package` */

LOCK TABLES `r_package` WRITE;

insert  into `r_package`(`package_id`,`description`,`endpoint`) values 
(1,'R Cast package','https://opencpu.bms-uat-test.net/ocpu/library/reshape/R/cast'),
(2,'R Melt package','https://opencpu.bms-uat-test.net/ocpu/library/reshape/R/melt'),
(3,'R qplot package','https://opencpu.bms-uat-test.net/ocpu/library/ggplot2/R/qplot');

UNLOCK TABLES;

/*Table structure for table `role` */

DROP TABLE IF EXISTS `role`;

CREATE TABLE `role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `role_type_id` int(11) NOT NULL,
  `active` tinyint(1) DEFAULT '1',
  `editable` tinyint(1) DEFAULT '1',
  `assignable` tinyint(1) DEFAULT '1',
  `created_by` int(11) DEFAULT NULL,
  `created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` int(11) DEFAULT NULL,
  `updated_date` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `description` (`name`),
  KEY `fk_role_3_idx` (`role_type_id`),
  KEY `fk_role_1_idx` (`created_by`),
  KEY `fk_role_2_idx` (`updated_by`),
  CONSTRAINT `fk_role_1` FOREIGN KEY (`created_by`) REFERENCES `users` (`userid`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_role_2` FOREIGN KEY (`updated_by`) REFERENCES `users` (`userid`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_role_3` FOREIGN KEY (`role_type_id`) REFERENCES `role_type` (`role_type_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

/*Data for the table `role` */

LOCK TABLES `role` WRITE;

insert  into `role`(`id`,`name`,`description`,`role_type_id`,`active`,`editable`,`assignable`,`created_by`,`created_date`,`updated_by`,`updated_date`) values 
(1,'ProgramAdmin',NULL,3,1,1,1,NULL,NULL,NULL,NULL),
(2,'Breeder',NULL,3,1,1,1,NULL,NULL,NULL,NULL),
(3,'Technician',NULL,3,1,1,1,NULL,NULL,NULL,NULL),
(4,'Readonly',NULL,3,1,1,1,NULL,NULL,NULL,NULL),
(5,'SuperAdmin',NULL,1,1,0,0,NULL,NULL,NULL,NULL),
(6,'InstanceAdmin','Instance Admin',1,1,1,1,1001,'2020-09-09 09:17:23',1001,'2020-09-09 09:17:23');

UNLOCK TABLES;

/*Table structure for table `role_permission` */

DROP TABLE IF EXISTS `role_permission`;

CREATE TABLE `role_permission` (
  `role_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`role_id`,`permission_id`),
  KEY `fk_role_permission_2_idx` (`permission_id`),
  CONSTRAINT `fk_role_permission_1` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_role_permission_2` FOREIGN KEY (`permission_id`) REFERENCES `permission` (`permission_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `role_permission` */

LOCK TABLES `role_permission` WRITE;

insert  into `role_permission`(`role_id`,`permission_id`) values 
(5,1),
(6,1),
(1,4),
(2,4),
(3,4),
(1,5),
(2,5),
(3,5),
(1,6),
(2,6),
(3,6),
(1,13),
(4,14),
(4,17),
(4,18),
(4,19),
(4,21),
(4,22),
(4,50);

UNLOCK TABLES;

/*Table structure for table `role_type` */

DROP TABLE IF EXISTS `role_type`;

CREATE TABLE `role_type` (
  `role_type_id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`role_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `role_type` */

LOCK TABLES `role_type` WRITE;

insert  into `role_type`(`role_type_id`,`name`) values 
(1,'INSTANCE'),
(2,'CROP'),
(3,'PROGRAM');

UNLOCK TABLES;

/*Table structure for table `role_type_permission` */

DROP TABLE IF EXISTS `role_type_permission`;

CREATE TABLE `role_type_permission` (
  `role_type_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL,
  `selectable` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`role_type_id`,`permission_id`),
  KEY `fk_role_type_permission_2_idx` (`permission_id`),
  CONSTRAINT `fk_role_type_permission_1` FOREIGN KEY (`role_type_id`) REFERENCES `role_type` (`role_type_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_role_type_permission_2` FOREIGN KEY (`permission_id`) REFERENCES `permission` (`permission_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `role_type_permission` */

LOCK TABLES `role_type_permission` WRITE;

insert  into `role_type_permission`(`role_type_id`,`permission_id`,`selectable`) values 
(1,1,1),
(1,2,1),
(1,3,1),
(1,4,1),
(1,5,1),
(1,6,1),
(1,7,1),
(1,8,1),
(1,9,1),
(1,10,1),
(1,11,1),
(1,14,1),
(1,15,1),
(1,16,1),
(1,17,1),
(1,18,1),
(1,19,1),
(1,20,1),
(1,21,1),
(1,22,1),
(1,23,1),
(1,24,1),
(1,25,1),
(1,26,1),
(1,27,1),
(1,28,1),
(1,29,1),
(1,30,1),
(1,31,1),
(1,32,1),
(1,33,1),
(1,34,1),
(1,35,1),
(1,36,1),
(1,37,1),
(1,38,1),
(1,39,1),
(1,40,1),
(1,41,1),
(1,42,1),
(1,43,1),
(1,44,1),
(1,45,1),
(1,46,1),
(1,47,1),
(1,48,1),
(1,49,1),
(1,50,1),
(1,51,1),
(2,1,0),
(2,3,1),
(2,4,1),
(2,5,1),
(2,6,1),
(2,7,1),
(2,8,1),
(2,9,1),
(2,10,1),
(2,11,1),
(2,14,1),
(2,15,1),
(2,16,1),
(2,17,1),
(2,18,1),
(2,19,1),
(2,20,1),
(2,21,1),
(2,22,1),
(2,23,1),
(2,24,1),
(2,25,1),
(2,26,1),
(2,27,1),
(2,28,1),
(2,29,1),
(2,30,1),
(2,31,1),
(2,32,1),
(2,33,1),
(2,34,1),
(2,35,1),
(2,36,1),
(2,37,1),
(2,38,1),
(2,39,1),
(2,40,1),
(2,41,1),
(2,42,1),
(2,43,1),
(2,44,1),
(2,45,1),
(2,46,1),
(2,47,1),
(2,48,1),
(2,49,1),
(2,50,1),
(2,51,1),
(3,1,0),
(3,3,0),
(3,4,1),
(3,5,1),
(3,6,1),
(3,8,1),
(3,9,1),
(3,10,1),
(3,11,0),
(3,13,1),
(3,14,1),
(3,15,1),
(3,16,1),
(3,17,1),
(3,18,1),
(3,19,1),
(3,20,1),
(3,21,1),
(3,22,1),
(3,42,1),
(3,43,1),
(3,44,1),
(3,45,1),
(3,46,1),
(3,47,1),
(3,48,1),
(3,50,1),
(3,51,1);

UNLOCK TABLES;

/*Table structure for table `standard_preset` */

DROP TABLE IF EXISTS `standard_preset`;

CREATE TABLE `standard_preset` (
  `standard_preset_id` int(11) NOT NULL AUTO_INCREMENT,
  `tool_id` int(10) unsigned DEFAULT NULL,
  `tool_section` varchar(255) DEFAULT NULL,
  `crop_name` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `configuration` text,
  PRIMARY KEY (`standard_preset_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

/*Data for the table `standard_preset` */

LOCK TABLES `standard_preset` WRITE;

insert  into `standard_preset`(`standard_preset_id`,`tool_id`,`tool_section`,`crop_name`,`name`,`configuration`) values 
(1,23,'FB_LBL_PRINT_CUSTOM_REPORT','wheat','label printing wheat cimmyt report','<?xml version=\"1.0\"?>\n<reports>\n   <profile>cimmyt</profile>\n   <report>\n	<code>WLBL05</code>\n	<name>Labels without Design, Wheat</name>\n   </report>\n   <report>\n	<code>WLBL21</code>\n	<name>Labels with Design, Wheat</name>\n   </report>   \n</reports>'),
(2,23,'FB_NURSE_MGR_CUSTOM_REPORT','wheat','nursery manager wheat cimmyt report','<?xml version=\"1.0\"?>\n<reports>\n   <profile>cimmyt</profile>\n   <report>\n	<code>WFb24</code>\n	<name>National Basic Material, Wheat</name>\n   </report>\n   <report>\n	<code>WFb25</code>\n	<name>National Segregatings, Wheat</name>\n   </report>   \n   <report>\n	<code>WFb26</code>\n	<name>Crossing Block (Bread Wheat) - National Basic Material, Wheat</name>\n   </report>   \n   <report>\n	<code>WFb42</code>\n	<name>Basic Material Wheat Germplasm Bank, Wheat</name>\n   </report>   \n   <report>\n	<code>WFb43</code>\n	<name>Crossing Block (Bread Wheat) - Basic Segregating Materials Wheat Germplasm Bank, Wheat</name>\n   </report>   \n   <report>\n	<code>WFb61</code>\n	<name>International Selection (BW, DW, TCL, Specials), Wheat</name>\n   </report>  \n   <report>\n	<code>WFb23/48</code>\n	<name>F1 Historic - F1 crosses, Wheat</name>\n   </report>   \n   <report>\n	<code>WFb47</code>\n	<name>Combined cross and national movement w/wo randomizations, ordered by entry, Wheat</name>\n   </report>\n</reports>'),
(3,23,'FB_NURSE_MGR_CUSTOM_REPORT','maize','nursery manager maize cimmyt report','<?xml version=\"1.0\"?>\n<reports>\n   <profile>cimmyt</profile>\n   <report>\n	<code>MFbNur</code>\n	<name>Nursery Template, Maize</name>\n   </report>    \n</reports>'),
(4,23,'FB_TRIAL_MGR_CUSTOM_REPORT','maize','trial manager maize cimmyt report','<?xml version=\"1.0\"?>\n<reports>\n   <profile>cimmyt</profile>\n   <report>\n	<code>MFbTrial</code>\n	<name>Trial Template, Maize</name>\n   </report>    \n</reports>'),
(5,23,'FB_TRIAL_MGR_CUSTOM_REPORT','wheat','trial manager wheat cimmyt report','<?xml version=\"1.0\"?>\n<reports>\n   <profile>cimmyt</profile>\n   <report>\n	<code>WFb29</code>\n	<name>For National Yield Trials w/ Randomizations, Ordered by Entry, Wheat</name>\n   </report>   \n   <report>\n	<code>WFb41</code>\n	<name>For National Yield Trials w/ Randomizations, Ordered by Plot, Wheat</name>\n   </report> \n   <report>\n	<code>WFb60</code>\n	<name>International Yield (Bread Wheat, Durum Wheat, Triticale, Specials), Wheat</name>\n   </report>    \n</reports>'),
(6,10,'BM_LIST_MGR_CUSTOM_REPORT','maize','list manager maize cimmyt report','<?xml version=\"1.0\"?>\n <reports>\n    <profile>cimmyt</profile>\n    <report>\n  <code>MFbShipList</code>\n  <name>Template for shipments, Maize</name>\n    </report>\n </reports>');

UNLOCK TABLES;

/*Table structure for table `users` */

DROP TABLE IF EXISTS `users`;

CREATE TABLE `users` (
  `userid` int(11) NOT NULL AUTO_INCREMENT,
  `instalid` int(11) NOT NULL DEFAULT '0',
  `ustatus` int(11) NOT NULL DEFAULT '0',
  `uaccess` int(11) NOT NULL DEFAULT '0',
  `utype` int(11) NOT NULL DEFAULT '0',
  `uname` varchar(30) NOT NULL DEFAULT '-',
  `upswd` varchar(60) NOT NULL DEFAULT '-',
  `personid` int(11) NOT NULL DEFAULT '0',
  `adate` int(11) NOT NULL DEFAULT '0',
  `cdate` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`userid`),
  KEY `users_idx01` (`instalid`),
  KEY `users_idx02` (`personid`),
  KEY `users_idx03` (`userid`)
) ENGINE=InnoDB AUTO_INCREMENT=1003 DEFAULT CHARSET=utf8;

/*Data for the table `users` */

LOCK TABLES `users` WRITE;

insert  into `users`(`userid`,`instalid`,`ustatus`,`uaccess`,`utype`,`uname`,`upswd`,`personid`,`adate`,`cdate`) values 
(1,0,1,150,420,'GMCLARENa','IR123',11,19961206,0),
(2,0,1,20,421,'GUEST','GUEST',6,19970615,0),
(3,2,1,100,422,'GMCLAREN5','HARGROVE',11,19990622,19980000),
(4,4,1,100,422,'GMCLAREN1','IR126',11,19970201,0),
(5,5,1,100,422,'WEUSEBIO','CIAT2',13,19970201,0),
(6,4,1,100,422,'GMCLAREN2','IR128',11,19970301,0),
(7,3,1,100,422,'VSCHMIT','IR129',3,19970401,19981001),
(8,4,1,100,422,'GMCLAREN3','IR130',11,19970516,0),
(9,11,1,100,422,'LRAMOS','IR131',24,19970527,20010000),
(10,1,1,100,422,'EEFONDULAN','IR124',2,19971206,19980101),
(11,6,1,100,422,'EUSEBIO1','WILLIAM',13,19970623,0),
(12,7,1,100,422,'GMCLAREN4','IR134',11,19971020,0),
(13,8,1,100,422,'EUSEBIO2','CPDHNC',13,19971020,0),
(14,9,1,100,422,'EUSEBIO3','KOREA',13,19971020,0),
(15,10,1,100,422,'EUSEBIO7','GEN',13,19971020,0),
(16,11,1,100,422,'RLANCERAS','PBGB1',8,19971209,0),
(17,12,1,100,422,'RLANCERAS2','PBGB2',8,19971209,0),
(18,11,1,30,423,'BMARASIGAN','IR133',25,19970819,0),
(19,13,1,100,422,'GMCLAREN6','IR111',11,0,0),
(20,13,1,30,423,'RTOLEDO','RTOLEDO',10,19980130,0),
(26,14,1,100,422,'RLANCERAS4','PBGB4',8,19980130,0),
(30,18,1,100,422,'GMCLAREN6a','IR333',11,19980526,0),
(31,100,1,30,423,'GMCLAREN7','IR678',11,19980813,0),
(32,20,1,100,422,'EUSEBIO6','KOREA1',13,19981112,0),
(33,20,1,100,422,'EUSEBIO4','KOREA2',13,19981112,0),
(34,2,1,100,422,'LUR RAMOS','INDIA',4,19990111,20010000),
(35,23,1,100,422,'EUSEBIO5','KOREA3',13,19990118,0),
(36,3,1,100,422,'ESACKS','ESACKS',18,19980511,0),
(37,24,1,100,422,'UBON','UBON',19,19990701,0),
(38,25,1,100,422,'MALLIK','MALLIK',20,19990701,0),
(39,26,1,100,422,'WEUSEBIO006','MALAYSIA',13,19990414,0),
(40,27,1,150,422,'WEUSEBIO007','IR007',13,19990807,0),
(41,28,1,100,422,'WEUSEBIO008','IR008',13,19990414,0),
(42,30,1,100,422,'WEUSEBIO009','IR009',13,0,0),
(43,31,1,100,422,'LMRAMOS','LMRAMOS',6,19991118,0),
(44,32,1,100,422,'LRAMOS2','LRAMOS2',24,19991213,0),
(45,33,1,100,422,'RMCNALLY01','RUTH01',6,19991119,0),
(53,41,1,100,422,'HYBRIDRICE','HYBRIDRICE',6,20000316,0),
(54,42,1,100,422,'RLPSL','RLPSL',6,19991005,0),
(55,43,1,100,422,'ADMIN3','ADMIN3',6,20000405,0),
(56,44,1,100,422,'MBARAOIDAN','MBARAOIDAN',6,0,0),
(57,45,1,100,422,'GREYES','GREYES',6,20000915,0),
(58,46,1,100,422,'ISMAIL','ISMAIL01',6,0,0),
(60,48,1,100,423,'CRRI','CRRI',6,20010307,0),
(66,11,1,100,422,'GSERIOSO','IR135',21,20010730,0),
(67,54,1,100,422,'PHILRICE','PHILRICE',6,20010521,0),
(69,68,1,100,422,'CCASAL02','CCASAL02',6,20010522,0),
(70,69,1,100,422,'WEUSEBIO1','WEUSEBIO',13,0,0),
(71,70,1,100,422,'MCALIBO','MCALIBO',6,20030917,0),
(76,70,1,100,422,'GSERIOSO01','GSERIOSO01',21,0,0),
(77,71,1,100,422,'WEUSEBIO007a','IR007',13,19990807,0),
(78,72,1,100,422,'WANG LEI 2','WANGLEI2',6,20041014,0),
(79,73,1,100,422,'GSERIOSO03','GSERIOSO03',21,20040621,0),
(83,73,1,100,422,'RMENDOZA1','RMENDOZA',9,20040621,0),
(100,100,1,100,422,'CAI TICHANG','IR132',5,19970530,0),
(101,101,1,100,423,'WANG LEI','WANGLEI',15,19970530,0),
(102,102,1,100,423,'TANG SHENGXIANG','TANG',16,19970530,0),
(103,55,1,100,422,'GMS_LOCAL','GMS',1,19970201,0),
(104,56,1,100,422,'THAI2','WHE01',6,0,0),
(105,57,1,100,422,'DAS01','DAS01',6,20020902,0),
(106,58,1,100,422,'YUNLU01','YUNLU01',6,20021028,0),
(107,59,1,100,422,'WEUSEBIO008a','IR008',13,20030516,0),
(108,60,1,100,422,'RBREED','RBREED',6,20030813,0),
(109,74,1,100,422,'JBAUTISTA','JBAUTISTA',23,20050107,0),
(110,74,1,100,422,'SPALMONES','SPALMONES',6,20050107,0),
(112,75,1,100,422,'RHERRERA','RHERRERA',6,20050318,0),
(115,77,1,100,422,'BARAOIDAN','BARAOIDAN',6,20040621,0),
(118,77,1,100,422,'WEUSEBIO08','WEUSEBIO08',13,20040621,0),
(119,78,1,100,422,'GCAPILIT','GCAPILIT',21,20050310,0),
(120,78,1,100,422,'SALABSABIN','SALABSABIN',6,20050310,0),
(121,79,1,100,422,'VSALAZAR','VSALAZAR',7,20050414,0),
(122,78,1,100,422,'GALEJAR','GALEJAR',6,20050310,0),
(123,78,1,100,422,'CLOTHO2','CLOTHO2',14,20050502,0),
(125,73,1,100,422,'CLOTHO','CLOTHO',14,20050506,0),
(126,80,1,100,422,'VSALAZAR2','VSALAZAR2',7,20050414,0),
(127,81,1,100,422,'KNG','KNG',6,20050517,0),
(132,82,1,100,422,'GSERIOSO02','GSERIOSO02',21,20040621,0),
(133,82,1,100,422,'CLOTHO02','CLOTHO02',14,20050622,0),
(137,83,1,100,422,'GSERIOSO05','GSERIOSO05',21,0,0),
(138,83,1,100,422,'CLOTHO01','CLOTHO01',14,0,0),
(139,84,1,100,422,'AALCANTARA','AALCANTARA',6,20050310,0),
(140,84,1,100,422,'DSALISI','DSALISI',6,20050310,0),
(142,84,1,100,422,'WEUSEBIO08a','WEUSEBIO08',13,20050310,0),
(144,84,1,100,422,'FDEGUZMAN','FDEGUZMAN',6,20050310,0),
(146,85,1,100,422,'GLSCAPILIT','GLSCAPILIT',21,20060331,0),
(149,85,1,100,422,'CLOTHO03','CLOTHO03',14,20060331,0),
(150,86,1,100,422,'FNAZARENO1','FNAZARENO',6,20050310,0),
(151,87,1,100,422,'RPRANTILLA','RPRANTILLA',6,20060504,0),
(178,86,1,100,422,'GCAPILIT4','GCAPILIT4',21,20061115,0),
(179,11,1,100,423,'CLOTHO06','CLOTHO06',14,20061206,0),
(180,91,1,100,422,'DPABALE01','DPABALE01',6,0,0),
(190,74,1,100,422,'GCAPILIT08','GCAPILIT08',21,20070207,0),
(191,88,1,100,422,'ASALABSABIN02','SALABSABIN',6,20070213,0),
(193,101,1,100,422,'FNAZARENO3','FNAZARENO3',6,20070214,0),
(194,92,1,100,422,'NRSH','NRSH',6,20070309,0),
(196,102,1,100,422,'GCAPILIT05','GCAPILIT05',21,20070322,0),
(199,102,1,100,422,'CLOTHO08','CLOTHO08',14,20070322,0),
(211,70,1,100,423,'TSTACRUZ','TSTACRUZ',6,20070214,0),
(216,84,1,100,422,'GRCLOCAL','GRCLOCAL',6,20070628,0),
(218,77,1,100,422,'GCAPILIT09','GCAPILIT09',21,20070731,0),
(219,103,1,100,422,'GCAPILIT07','GCAPILIT07',21,20071212,0),
(221,87,1,100,422,'AALCANTARA1','AALCANTARA',6,20080205,0),
(224,87,1,100,422,'LSICAT1','LSICAT',6,20080205,0),
(225,87,1,100,422,'NELIA','NELIA',6,20080205,0),
(230,87,1,100,422,'JELEUTERIO1','JELEUTERIO',6,20080205,0),
(231,105,1,100,422,'DPABALE03','DPABALE03',6,20080115,0),
(238,74,1,100,422,'MALMODIEL','MALMODIEL',6,20080200,0),
(240,106,1,100,422,'CLOTHO09','CLOTHO09',14,20070110,0),
(245,103,1,100,422,'CLOTHO10','CLOTHO10',14,20080403,0),
(249,70,1,100,422,'JGUEVARRA','JGUEVARRA',6,20070509,0),
(251,85,1,100,422,'WEUSEBIO09','WEUSEBIO09',13,20080616,0),
(252,105,1,100,422,'HVALERA','HVALERA',6,20080528,0),
(253,11,1,100,422,'WEUSEBIO10','WEUSEBIO10',13,20080528,0),
(256,102,1,100,422,'WEUSEBIO13','WEUSEBIO13',13,20080528,0),
(257,103,1,100,422,'WEUSEBIO14','WEUSEBIO14',13,20080528,0),
(258,70,1,100,422,'WEUSEBIO15','WEUSEBIO15',13,20080528,0),
(259,78,1,100,422,'WEUSEBIO16','WEUSEBIO16',13,20080528,0),
(262,73,1,100,422,'WEUSEBIO19','WEUSEBIO19',13,20080623,0),
(266,86,1,100,422,'VALCANTARA','VALCANTARA',22,20080707,0),
(267,11,1,100,422,'WEUSEBIO21','WEUSEBIO21',13,20080528,0),
(268,108,1,100,422,'HVALERA04','HVALERA04',6,20080822,0),
(284,101,1,100,422,'EREDONA1','EREDONA1',12,20060906,0),
(294,84,1,100,422,'LSISON','LSISON',6,2008110,0),
(295,103,1,100,422,'JRAMOS','JRAMOS',6,20071212,0),
(298,84,1,100,422,'GCAPILIT11','GCAPILIT11',21,20090121,0),
(299,83,1,100,422,'JKYAP','JKYAP',6,20070905,20070905),
(300,109,1,100,422,'WEUSEBIO22','WEUSEBIO22',13,20080325,0),
(307,110,1,100,422,'THAZEKAMP','THAZEKAMP',17,20100104,0),
(308,105,1,100,422,'RANACLETO1','RANACLETO1',6,20091123,0),
(309,108,1,100,422,'RANACLETO4','RANACLETO4',6,20080822,0),
(310,110,1,100,422,'GCAPILIT12','GCAPILIT12',21,20100420,0),
(311,70,1,100,422,'RCARPIO','RCARPIO',6,20100716,0),
(312,94,1,100,422,'AFUENTES','AFUENTES',6,20100114,0),
(313,111,1,100,422,'GCAPILIT13','GCAPILIT13',21,20110301,0),
(314,111,1,100,422,'SMERCADO','SMERCADO',6,20110301,0),
(315,87,1,100,422,'gcapilit14','gcapilit14',21,20110617,0),
(316,87,1,100,422,'lsison2','lsison2',6,20110617,0),
(317,87,1,100,422,'nresurreccion','nelia',6,20110617,0),
(319,112,1,100,422,'RSULABO02','RSULABO02',6,20090827,0),
(320,113,1,100,422,'AKARTHIK','AKARTHIK',6,20110905,0),
(321,74,1,100,422,'MCARDENAS','MCARDENAS',6,20110901,0),
(322,87,1,100,423,'ldomagsang','ldomagsang',6,20110214,0),
(323,86,1,100,422,'NSINGSON','NSINGSON',6,20090712,0),
(324,109,1,100,422,'VALCANTARA2','VALCANTARA',22,20120102,0),
(325,114,1,100,422,'CPARDUCHO','CPARDUCHO',6,20120402,0),
(326,83,1,100,422,'Cparducho1','Cparducho1',6,20120727,0),
(327,115,1,100,422,'AFRANCO','ARTURO',6,20120803,0),
(328,115,1,100,422,'eatorrez','rice',6,10100114,0),
(1001,0,0,0,0,'admin','$2a$10$kx2iupiSGp7Q4A7K8oUx/OZIeS6yEra6KxN0G.9qm2vQloTXzV28K',1001,20141210,20141210),
(1002,0,0,0,0,'gmclaren','$2a$10$2xF1/fOvuG.odNvpmYW5h.mTuP6PPyZMstRkGEHCbQ50zlpAifsYm',1002,20200930,20200930);

UNLOCK TABLES;

/*Table structure for table `users_roles` */

DROP TABLE IF EXISTS `users_roles`;

CREATE TABLE `users_roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userid` int(11) NOT NULL,
  `role_id` int(11) DEFAULT NULL,
  `crop_name` varchar(32) DEFAULT NULL,
  `workbench_project_id` int(10) unsigned DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `users_roles_idx01` (`userid`),
  KEY `fk_user_role_id` (`role_id`),
  KEY `fk_crop_name_idx` (`crop_name`),
  KEY `fk_workbenck_project` (`workbench_project_id`),
  KEY `fk_users_roles_2_idx` (`created_by`),
  CONSTRAINT `fk_crop_name` FOREIGN KEY (`crop_name`) REFERENCES `workbench_crop` (`crop_name`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_user_role_id` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_users` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_users_roles_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`userid`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_workbenck_project` FOREIGN KEY (`workbench_project_id`) REFERENCES `workbench_project` (`project_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

/*Data for the table `users_roles` */

LOCK TABLES `users_roles` WRITE;

insert  into `users_roles`(`id`,`userid`,`role_id`,`crop_name`,`workbench_project_id`,`created_by`,`created_date`) values 
(1,1001,5,NULL,NULL,NULL,NULL),
(2,1002,6,NULL,NULL,1001,'2020-09-09 09:17:39');

UNLOCK TABLES;

/*Table structure for table `workbench_crop` */

DROP TABLE IF EXISTS `workbench_crop`;

CREATE TABLE `workbench_crop` (
  `crop_name` varchar(32) NOT NULL,
  `db_name` varchar(64) DEFAULT NULL,
  `schema_version` varchar(32) DEFAULT NULL,
  `plot_code_prefix` varchar(4) DEFAULT NULL,
  `use_uuid` tinyint(1) unsigned zerofill NOT NULL DEFAULT '1',
  PRIMARY KEY (`crop_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `workbench_crop` */

LOCK TABLES `workbench_crop` WRITE;

insert  into `workbench_crop`(`crop_name`,`db_name`,`schema_version`,`plot_code_prefix`,`use_uuid`) values 
('rice','ibdbv2_rice_merged','4.0.0','4872',1),
('tutorial1','ibdbv2_tutorial1_merged','4.0.0','L1DO',1);

UNLOCK TABLES;

/*Table structure for table `workbench_project` */

DROP TABLE IF EXISTS `workbench_project`;

CREATE TABLE `workbench_project` (
  `project_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `project_name` varchar(255) NOT NULL,
  `start_date` date DEFAULT NULL,
  `project_uuid` varchar(36) NOT NULL,
  `crop_type` varchar(32) DEFAULT NULL,
  `last_open_date` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`project_id`),
  UNIQUE KEY `uk_project_uuid` (`crop_type`,`project_uuid`),
  UNIQUE KEY `uk_project_name` (`project_name`,`crop_type`),
  CONSTRAINT `fk_project_2` FOREIGN KEY (`crop_type`) REFERENCES `workbench_crop` (`crop_name`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

/*Data for the table `workbench_project` */

LOCK TABLES `workbench_project` WRITE;

insert  into `workbench_project`(`project_id`,`user_id`,`project_name`,`start_date`,`project_uuid`,`crop_type`,`last_open_date`) values 
(1,1002,'Test program','2020-09-09','955ed9e7-0adc-42ca-8239-2281b5462b9e','tutorial1','2020-10-01 10:13:28');

UNLOCK TABLES;

/*Table structure for table `workbench_project_activity` */

DROP TABLE IF EXISTS `workbench_project_activity`;

CREATE TABLE `workbench_project_activity` (
  `project_activity_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` int(10) unsigned NOT NULL,
  `name` varchar(128) NOT NULL,
  `description` text,
  `user_id` int(11) NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`project_activity_id`),
  KEY `fk_project_activity_1` (`project_id`),
  KEY `fk_project_activity_2` (`user_id`),
  CONSTRAINT `fk_project_activity_1` FOREIGN KEY (`project_id`) REFERENCES `workbench_project` (`project_id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_project_activity_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`userid`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

/*Data for the table `workbench_project_activity` */

LOCK TABLES `workbench_project_activity` WRITE;

insert  into `workbench_project_activity`(`project_activity_id`,`project_id`,`name`,`description`,`user_id`,`date`) values 
(1,1,'List Manager','Launched List Manager',1002,'2020-09-30 15:06:23'),
(2,1,'Breeding Manager - Germplasm Import','Launched Breeding Manager - Germplasm Import',1002,'2020-09-30 15:06:26'),
(3,1,'Imported a Germplasm List','Imported list from file CGMGI20.xls',1002,'2020-09-30 15:06:28'),
(4,1,'Fieldbook Web - Study Manager','Launched Fieldbook Web - Study Manager',1002,'2020-09-30 15:06:32'),
(5,1,'List Manager','Launched List Manager',1002,'2020-09-30 16:53:12'),
(6,1,'Manage Inventory','Launched Manage Inventory',1002,'2020-09-30 16:54:03'),
(7,1,'Fieldbook Web - Study Manager','Launched Fieldbook Web - Study Manager',1002,'2020-09-30 16:54:32'),
(8,1,'List Manager','Launched List Manager',1002,'2020-10-01 10:11:58'),
(9,1,'Manage Inventory','Launched Manage Inventory',1002,'2020-10-01 10:12:51'),
(10,1,'List Manager','Launched List Manager',1002,'2020-10-01 10:12:58'),
(11,1,'Manage Inventory','Launched Manage Inventory',1002,'2020-10-01 10:13:01'),
(12,1,'List Manager','Launched List Manager',1002,'2020-10-01 10:13:28');

UNLOCK TABLES;

/*Table structure for table `workbench_project_user_info` */

DROP TABLE IF EXISTS `workbench_project_user_info`;

CREATE TABLE `workbench_project_user_info` (
  `user_info_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` int(10) unsigned NOT NULL,
  `user_id` int(11) NOT NULL,
  `last_open_date` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`user_info_id`),
  UNIQUE KEY `project_id` (`project_id`,`user_id`),
  KEY `fk_workbench_project_user_info_idx` (`project_id`),
  KEY `fk_workbench_project_user_info_2_idx` (`user_id`),
  CONSTRAINT `fk_workbench_project_user_info_1` FOREIGN KEY (`project_id`) REFERENCES `workbench_project` (`project_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_workbench_project_user_info_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`userid`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

/*Data for the table `workbench_project_user_info` */

LOCK TABLES `workbench_project_user_info` WRITE;

insert  into `workbench_project_user_info`(`user_info_id`,`project_id`,`user_id`,`last_open_date`) values 
(1,1,1002,'2020-10-01 10:13:28');

UNLOCK TABLES;

/*Table structure for table `workbench_sidebar_category` */

DROP TABLE IF EXISTS `workbench_sidebar_category`;

CREATE TABLE `workbench_sidebar_category` (
  `sidebar_category_id` int(11) NOT NULL AUTO_INCREMENT,
  `sidebar_category_name` varchar(255) NOT NULL,
  `sidebar_category_label` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`sidebar_category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

/*Data for the table `workbench_sidebar_category` */

LOCK TABLES `workbench_sidebar_category` WRITE;

insert  into `workbench_sidebar_category`(`sidebar_category_id`,`sidebar_category_name`,`sidebar_category_label`) values 
(1,'activities','Breeding Activities'),
(2,'information_mgt','Information Management'),
(3,'statistical_analysis','Statistical Analysis'),
(5,'additional_tools','Additional Tools'),
(7,'admin','Program Administration'),
(8,'inventory_manager','Inventory Manager');

UNLOCK TABLES;

/*Table structure for table `workbench_sidebar_category_link` */

DROP TABLE IF EXISTS `workbench_sidebar_category_link`;

CREATE TABLE `workbench_sidebar_category_link` (
  `sidebar_category_link_id` int(11) NOT NULL AUTO_INCREMENT,
  `tool_name` varchar(128) NOT NULL,
  `sidebar_category_id` int(11) NOT NULL,
  `sidebar_link_name` varchar(255) DEFAULT NULL,
  `sidebar_link_title` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`sidebar_category_link_id`),
  KEY `sidebar_category_id_idx` (`sidebar_category_id`),
  KEY `tool_name` (`tool_name`),
  CONSTRAINT `fk_tool_name` FOREIGN KEY (`tool_name`) REFERENCES `workbench_tool` (`name`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `sidebar_category_id` FOREIGN KEY (`sidebar_category_id`) REFERENCES `workbench_sidebar_category` (`sidebar_category_id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;

/*Data for the table `workbench_sidebar_category_link` */

LOCK TABLES `workbench_sidebar_category_link` WRITE;

insert  into `workbench_sidebar_category_link`(`sidebar_category_link_id`,`tool_name`,`sidebar_category_id`,`sidebar_link_name`,`sidebar_link_title`) values 
(1,'bm_list_manager_main',1,'manage_list','Manage Germplasm'),
(5,'germplasm_import',2,'germplasm_import','Import Germplasm'),
(6,'gdms',2,'gdms','Manage Genotyping Data'),
(7,'study_browser',2,'study_browser','Browse Studies'),
(8,'germplasm_mainheadtohead',2,'main_hxh','Head to Head Query'),
(10,'ontology_manager',2,'ontology_manager','Manage Ontologies'),
(11,'breeding_view_wb',3,'breeding_view_wb','Single-Site Analysis'),
(12,'breeding_gxe',3,'breeding_gxe','Multi-Site Analysis'),
(19,'dataset_importer',2,'dataset_importer','Import Datasets'),
(23,'study_manager_fieldbook_web',1,'manage_trials','Manage Studies'),
(24,'manage_program',7,'manage_program','Manage Program Settings'),
(25,'backup_restore',7,'backup_restore','Tutorial Save and Load'),
(27,'trait_donor_query',2,'trait_donor_query','Multi-trait Query'),
(28,'sample_manager',1,'manage_samples','Manage Samples'),
(29,'inventory_manager',8,'inventory_manager','Manage Inventory'),
(30,'graphical_queries',2,'graphical_queries','Graphical Queries');

UNLOCK TABLES;

/*Table structure for table `workbench_sidebar_category_link_role` */

DROP TABLE IF EXISTS `workbench_sidebar_category_link_role`;

CREATE TABLE `workbench_sidebar_category_link_role` (
  `sidebar_category_link_role_id` int(11) NOT NULL AUTO_INCREMENT,
  `sidebar_category_link_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  PRIMARY KEY (`sidebar_category_link_role_id`),
  UNIQUE KEY `uk_sidebar_category_link_role` (`sidebar_category_link_id`,`role_id`),
  KEY `fk_sidebar_category_link_role2` (`role_id`),
  CONSTRAINT `fk_sidebar_category_link_role1` FOREIGN KEY (`sidebar_category_link_id`) REFERENCES `workbench_sidebar_category_link` (`sidebar_category_link_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_sidebar_category_link_role2` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `workbench_sidebar_category_link_role` */

LOCK TABLES `workbench_sidebar_category_link_role` WRITE;

insert  into `workbench_sidebar_category_link_role`(`sidebar_category_link_role_id`,`sidebar_category_link_id`,`role_id`) values 
(2,1,1),
(17,1,2),
(32,1,3),
(47,1,4),
(54,1,5),
(7,5,1),
(59,5,5),
(6,6,1),
(21,6,2),
(36,6,3),
(58,6,5),
(12,7,1),
(24,7,2),
(39,7,3),
(51,7,4),
(64,7,5),
(8,8,1),
(22,8,2),
(37,8,3),
(50,8,4),
(60,8,5),
(10,10,1),
(62,10,5),
(4,11,1),
(19,11,2),
(34,11,3),
(49,11,4),
(56,11,5),
(3,12,1),
(18,12,2),
(33,12,3),
(48,12,4),
(55,12,5),
(5,19,1),
(20,19,2),
(35,19,3),
(57,19,5),
(13,23,1),
(25,23,2),
(40,23,3),
(65,23,5),
(9,24,1),
(61,24,5),
(72,27,1),
(73,27,2),
(76,27,3),
(74,27,4),
(75,27,5),
(68,28,1),
(69,28,2),
(70,28,3),
(71,28,5);

UNLOCK TABLES;

/*Table structure for table `workbench_tool` */

DROP TABLE IF EXISTS `workbench_tool`;

CREATE TABLE `workbench_tool` (
  `tool_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(128) NOT NULL,
  `group_name` varchar(128) NOT NULL,
  `title` varchar(255) NOT NULL,
  `version` varchar(16) NOT NULL,
  `tool_type` enum('WEB','WEB_WITH_LOGIN','NATIVE','WORKBENCH','ADMIN') DEFAULT NULL,
  `path` text,
  `parameter` varchar(255) NOT NULL DEFAULT '',
  `user_tool` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`tool_id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8;

/*Data for the table `workbench_tool` */

LOCK TABLES `workbench_tool` WRITE;

insert  into `workbench_tool`(`tool_id`,`name`,`group_name`,`title`,`version`,`tool_type`,`path`,`parameter`,`user_tool`) values 
(1,'mbdt','mbdt','MBDT','1.0.3','NATIVE','C:\\BMS4/tools/mbdt/MBDT.exe','',0),
(2,'optimas','optimas','OptiMAS','1.4','NATIVE','C:\\BMS4/tools/optimas/optimas_gui.exe','',0),
(4,'breeding_view','breeding_view','Breeding View','1.1.0.13452','NATIVE','C:\\BMS4/tools/breeding_view/Bin/BreedingView.exe','',0),
(6,'germplasm_browser','germplasm_browser','Browse Germplasm Information','3.0.0.RELEASE','WEB','ibpworkbench/maingpsb/germplasm/','',0),
(7,'study_browser','study_browser','Browse Studies and Datasets','3.0.0.RELEASE','WEB','ibpworkbench/maingpsb/study/','',0),
(8,'germplasm_list_browser','germplasm_list_browser','Browse Germplasm Lists','3.0.0.RELEASE','WEB','ibpworkbench/maingpsb/germplasmlist/','',0),
(9,'gdms','gdms','GDMS','1.2.3','WEB_WITH_LOGIN','GDMS/main/','',0),
(10,'list_manager','list_manager','List Manager (old)','3.0.0.RELEASE','WEB','ibpworkbench/bm/germplasm-import/','',0),
(11,'crossing_manager','crossing_manager','Crossing Manager','3.0.0.RELEASE','WEB','ibpworkbench/bm/crosses/','',0),
(12,'nursery_template_wizard','nursery_template_wizard','Nursery Template Wizard','3.0.0.RELEASE','WEB','ibpworkbench/bm/nursery-template/?restartApplication','',0),
(13,'breeding_planner','breeding_planner','Breeding Planner','1.0','NATIVE','C:\\BMS4/tools/breeding_planner/breeding_planner.exe','',0),
(15,'germplasm_import','germplasm_import','Breeding Manager - Germplasm Import','3.0.0.RELEASE','WEB','ibpworkbench/bm/germplasm-import/','',0),
(17,'germplasm_mainheadtohead','germplasm_mainheadtohead','Fieldbook Germplasm MAIN Head To Head','3.0.0.RELEASE','WEB','ibpworkbench/maingpsb/Head_to_head_comparison','',0),
(18,'dataset_importer','dataset_importer','Data Import Tool','3.0.0.RELEASE','WEB','Fieldbook/etl/','',0),
(19,'query_for_adapted_germplasm','query_for_adapted_germplasm','Query For Adapted Germplasm','3.0.0.RELEASE','WEB','ibpworkbench/maingpsb/Query_For_Adapted_Germplasm','',0),
(20,'breeding_view_wb','breeding_view','Single-Site Analysis','3.0.0.RELEASE','WORKBENCH','ibpworkbench/main/#/breeding_view','',0),
(21,'breeding_gxe','breeding_gxe','Multi-Site Analysis','3.0.0.RELEASE','WORKBENCH','ibpworkbench/main/#/BreedingGxE','',0),
(22,'bm_list_manager','bm_list_manager','List Manager','3.0.0.RELEASE','WEB','ibpworkbench/bm/listmanager','',0),
(23,'fieldbook_web','fieldbook_web','Fieldbook Web','3.0.0.RELEASE','WEB','Fieldbook','',0),
(24,'nursery_manager_fieldbook_web','nursery_manager_fieldbook_web','Fieldbook Web - Nursery Manager','3.0.0.RELEASE','WEB','Fieldbook/NurseryManager','',0),
(25,'trial_manager_fieldbook_web','trial_manager_fieldbook_web','Fieldbook Web - Trial Manager','3.0.0.RELEASE','WEB','Fieldbook/TrialManager ','',0),
(26,'ontology_manager','ontology_manager','Ontology Manager','1.0','WEB','ibpworkbench/controller/ontology','',0),
(27,'bv_meta_analysis','bv_meta_analysis','Meta Analysis of Field Trials','3.0.0.RELEASE','WORKBENCH','ibpworkbench/main/#/bv_meta_analysis','',0),
(28,'bm_list_manager_main','bm_list_manager_main','List Manager','3.0.0.RELEASE','WEB','ibpworkbench/bm/list-manager','',0),
(29,'study_browser_with_id','study_browser_with_id','Browse Studies and Datasets','3.0.0.RELEASE','WEB','ibpworkbench/maingpsb/studybrowser/','',0),
(30,'trait_donor_query','trait_donor','Trait Donor Query','3.0.0-BETA','WEB','ibpworkbench/maingpsb/Trait_Donors_Query','',0),
(31,'migrator','migrator','BMS 3 to 4 Data Migrator','1.0','WEB','migrator3to4/','',0),
(32,'sample_manager','sample_manager','Sample Manager','8.3','WEB','/ibpworkbench/controller/jhipster#sample-manager','',0),
(33,'study_manager_fieldbook_web','study_manager_fieldbook_web','Fieldbook Web - Study Manager','8.2','WEB','Fieldbook/TrialManager','',0),
(34,'manage_program','manage_program','Manage Program Settings','9.2','WORKBENCH','/ibpworkbench/main','',0),
(35,'backup_restore','backup_restore','Tutorial Save and Load','9.2','WORKBENCH','/ibpworkbench/main','',0),
(36,'inventory_manager','inventory_manager','Manage Inventory','14.1','WEB','inventory-manager/#/','',0),
(37,'graphical_queries','graphical_queries','Graphical Queries','15.4','WEB','/ibpworkbench/controller/graphical-queries','',0);

UNLOCK TABLES;

/*Table structure for table `workbench_user_info` */

DROP TABLE IF EXISTS `workbench_user_info`;

CREATE TABLE `workbench_user_info` (
  `user_id` int(11) NOT NULL,
  `login_count` int(11) NOT NULL DEFAULT '0',
  `reset_token` varchar(255) DEFAULT NULL,
  `reset_expiry_date` datetime DEFAULT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `workbench_user_info` */

LOCK TABLES `workbench_user_info` WRITE;

insert  into `workbench_user_info`(`user_id`,`login_count`,`reset_token`,`reset_expiry_date`) values 
(1001,5,NULL,NULL),
(1002,7,NULL,NULL);

UNLOCK TABLES;

/* Procedure structure for procedure `createPlotCodePrefix` */

/*!50003 DROP PROCEDURE IF EXISTS  `createPlotCodePrefix` */;

DELIMITER $$

/*!50003 CREATE DEFINER=`root`@`localhost` PROCEDURE `createPlotCodePrefix`()
BEGIN

					DECLARE updateDone INT DEFAULT 0;
					DECLARE valueGenerated VARCHAR(4) charset UTF8 COLLATE utf8_general_ci;
					DECLARE result INT;
					DECLARE cropName VARCHAR(32) charset UTF8 COLLATE utf8_general_ci;
					DECLARE plotCodePrefix VARCHAR(4) charset UTF8 COLLATE utf8_general_ci;

					DECLARE cur1 CURSOR FOR
						SELECT
						   crop_name COLLATE utf8_general_ci,
						   plot_code_prefix COLLATE utf8_general_ci
						FROM
						   workbench_crop;

					DECLARE CONTINUE HANDLER FOR SQLSTATE '02000'

					SET updateDone = 1;

					OPEN cur1;
					read_loop: LOOP FETCH cur1 INTO cropName, plotCodePrefix;

						IF updateDone = 1
						THEN
						   LEAVE read_loop;
						END IF;

						IF (plotCodePrefix is null) THEN

							SELECT
							   LPAD(CONV(FLOOR(RAND() * POW(36, 6)), 10, 36), 4, 0)
							INTO @valueGenerated;

							SELECT
							   COUNT(1) INTO result
							FROM
							   workbench_crop
							WHERE
							   plot_code_prefix = @valueGenerated;

							WHILE (result >= 1) DO
								SELECT
								   LPAD(CONV(FLOOR(RAND() * POW(36, 6)), 10, 36), 4, 0) INTO @valueGenerated;
								SELECT
								   COUNT(1) INTO result
								FROM
								   workbench_crop
								WHERE
								   plot_code_prefix = @valueGenerated;
							END WHILE;

							UPDATE
							   workbench_crop
							SET
							   plot_code_prefix = @valueGenerated
							WHERE
							   crop_name = cropName;

						END IF;

					END LOOP read_loop;

					CLOSE cur1;
				END */$$
DELIMITER ;

/* Procedure structure for procedure `getMetrics` */

/*!50003 DROP PROCEDURE IF EXISTS  `getMetrics` */;

DELIMITER $$

/*!50003 CREATE DEFINER=`root`@`localhost` PROCEDURE `getMetrics`()
BEGIN

					DECLARE cropName VARCHAR(255);
					DECLARE cropDB VARCHAR(255);
					DECLARE program INT;
					DECLARE userNo INT;
					DECLARE germplasm INT;
					DECLARE delGermplasm INT;
					DECLARE study INT;
					DECLARE delStudy INT;
					DECLARE phenotypes INT;
					DECLARE plots INT;
					DECLARE list INT;
					DECLARE location INT;
					DECLARE newVariable INT;
					DECLARE lot INT;
					DECLARE gdmsDSet INT;
					DECLARE gdmsDSetEntries INT;
					DECLARE sample INT;
					DECLARE nursery INT;
					DECLARE trial INT;
					DECLARE dateExec DATETIME;

					DECLARE loop0_eof BOOLEAN DEFAULT FALSE;	
					DECLARE cur0 CURSOR FOR select crop_name, db_name from workbench.workbench_crop;
					DECLARE CONTINUE HANDLER FOR NOT FOUND SET loop0_eof = TRUE; 
					
					/* loop for each crop */
					IF((SELECT COUNT(*) FROM workbench.workbench_crop) != 0) THEN
						
						OPEN cur0;
						loop0: LOOP 
						FETCH cur0 INTO cropName, cropDB;
						IF loop0_eof THEN 
							LEAVE loop0;
						END IF;
						
						
						SET @s = CONCAT('SELECT COUNT(*) FROM workbench.workbench_project WHERE crop_type = "',cropName,'" INTO @program;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;
						
						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.users INTO @userNo;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;

						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.germplsm g WHERE g.deleted = 0 INTO @germplasm;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;

						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.germplsm g WHERE g.deleted = 1 INTO @delGermplasm;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;
						
						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.project prog WHERE (prog.name LIKE "%PLOTDATA") and (prog.deleted=0) INTO @study;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;

						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.project prog WHERE (prog.name LIKE "%PLOTDATA%") and (prog.deleted=1) INTO @delStudy;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;
						
						SET @s = CONCAT('SELECT COUNT(*) FROM  ',cropDB,'.project p , ',cropDB,'.project_relationship pr, ',cropDB,'.study_type s
							WHERE s.study_type_id = p.study_type_id AND pr.subject_project_id = p.project_id
							AND visible  = 1
							AND label LIKE "%nursery%"
							AND p.deleted=0 
							AND p.name NOT LIKE "%template%"
							AND pr.type_id = 1145 INTO @nursery;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;
						
						SET @s = CONCAT('SELECT COUNT(*) FROM  ',cropDB,'.project p , ',cropDB,'.project_relationship pr, ',cropDB,'.study_type s
							WHERE s.study_type_id = p.study_type_id AND pr.subject_project_id = p.project_id
							AND visible  = 1
							AND label LIKE "%trial%"
							AND p.deleted=0 
							AND p.name NOT LIKE "%template%"
							AND pr.type_id = 1145 INTO @trial;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;


						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.phenotype INTO @phenotypes;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;

						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.nd_experiment INTO @plots;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;

						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.listnms l WHERE l.liststatus <> 9 INTO @list;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;	
						
						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.location loc WHERE loc.locid > 9015 INTO @location;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;
						
						SET @s = CONCAT('SELECT COUNT(*) FROM (',cropDB,'.cvterm cvt JOIN ',cropDB,'.cvtermprop cvProp ON ((cvt.cvterm_id=cvProp.cvterm_id) AND (cvt.cvterm_id > 100000) AND (cvt.cv_id=1040) AND (cvProp.value="Trait"))) INTO @newVariable;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;	
						
						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.ims_lot INTO @lot;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;	
						
						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.gdms_dataset INTO @gdmsDSet;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;	
						
						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.gdms_acc_metadataset INTO @gdmsDSetEntries;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;
						
						SET @s = CONCAT('SELECT COUNT(*) FROM ',cropDB,'.sample INTO @sample;');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;	
						
						SET @s = CONCAT('INSERT INTO metrics (crop_name, program, user, germplasm, delGermplasm, study, delStudy, nursery, trial, phenotypes, plots, list, location, newVariable, lot, gdmsDSet, gdmsDSetEntries, sample, dateExec) VALUES ("',cropName,'",@program, @userNo, @germplasm, @delGermplasm, @study, @delStudy, @nursery, @trial, @phenotypes, @plots, @list, @location, @newVariable, @lot, @gdmsDSet, @gdmsDSetEntries, @sample, now());');
						SELECT @s; 
						PREPARE stmt FROM @s;
						EXECUTE stmt;	
						DEALLOCATE PREPARE stmt;
						

						END LOOP loop0; 
						CLOSE cur0; 

					END IF;
				END */$$
DELIMITER ;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
