--  *********************************************************************
--  Update Database Script
--  *********************************************************************
--  Change Log: /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/upgrade/upgrade.changelog-up-to-1.12.0.xml
--  Ran at: 03/04/20 12:06
--  Against: squashtest_adm@localhost@jdbc:mysql://localhost:3306/squashtest_maint
--  Liquibase version: 2.0.5
--  *********************************************************************

--  Lock Database
--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0::jsimon::(Checksum: 3:73810dd59459401f6b26a4269d32fb6e)
--  Update TM database version number
UPDATE `CORE_CONFIG` SET `VALUE` = '1.12.0' WHERE STR_KEY = 'squashtest.tm.database.version';

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('jsimon', 'Update TM database version number', NOW(), 'Update Data', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0', '2.0.5', '3:73810dd59459401f6b26a4269d32fb6e', 339);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feature-3607-1::jsimon::(Checksum: 3:35fcb826269f492dfe47bb51c3a5c5fb)
--  Table for Milestones
CREATE TABLE `MILESTONE` (`MILESTONE_ID` BIGINT AUTO_INCREMENT NOT NULL, `LABEL` VARCHAR(30) NOT NULL, `STATUS` VARCHAR(30) NULL, `END_DATE` DATETIME NOT NULL, `DESCRIPTION` LONGTEXT NULL, `M_RANGE` VARCHAR(30) NOT NULL, `CREATED_BY` VARCHAR(50) NOT NULL, `CREATED_ON` DATETIME NOT NULL, `LAST_MODIFIED_BY` VARCHAR(50) DEFAULT null NULL, `LAST_MODIFIED_ON` DATETIME DEFAULT null NULL, `USER_ID` BIGINT NOT NULL, CONSTRAINT `PK_MILESTONE` PRIMARY KEY (`MILESTONE_ID`), CONSTRAINT `fk_milestone_owner` FOREIGN KEY (`USER_ID`) REFERENCES CORE_USER(PARTY_ID), UNIQUE (`LABEL`));

CREATE INDEX `idx_milestone` ON `MILESTONE`(`MILESTONE_ID`);

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('jsimon', 'Table for Milestones', NOW(), 'Create Table, Create Index', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feature-3607-1', '2.0.5', '3:35fcb826269f492dfe47bb51c3a5c5fb', 340);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feature-3608-1::jsimon::(Checksum: 3:0477d7c91c2d526abf01c921e3eb28a6)
--  Table for MilestoneBinding
CREATE TABLE `MILESTONE_BINDING` (`MILESTONE_BINDING_ID` BIGINT AUTO_INCREMENT NOT NULL, `MILESTONE_ID` BIGINT NOT NULL, `PROJECT_ID` BIGINT NOT NULL, CONSTRAINT `PK_MILESTONE_BINDING` PRIMARY KEY (`MILESTONE_BINDING_ID`), CONSTRAINT `FK_MILESTONE_BINDING_PROJECT` FOREIGN KEY (`PROJECT_ID`) REFERENCES PROJECT(PROJECT_ID), CONSTRAINT `FK_MILESTONE_BINDING_MILESTONE` FOREIGN KEY (`MILESTONE_ID`) REFERENCES MILESTONE(MILESTONE_ID));

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('jsimon', 'Table for MilestoneBinding', NOW(), 'Create Table', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feature-3608-1', '2.0.5', '3:0477d7c91c2d526abf01c921e3eb28a6', 341);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feature-3609-1::jsimon::(Checksum: 3:c7ead5ace5583a01da639c5bd1de18d0)
--  Table for MilestoneBindingPerimeter
CREATE TABLE `MILESTONE_BINDING_PERIMETER` (`MILESTONE_BINDING_PERIMETER_ID` BIGINT AUTO_INCREMENT NOT NULL, `MILESTONE_ID` BIGINT NOT NULL, `PROJECT_ID` BIGINT NOT NULL, CONSTRAINT `PK_MILESTONE_BINDING_PERIMETER` PRIMARY KEY (`MILESTONE_BINDING_PERIMETER_ID`), CONSTRAINT `FK_MILESTONE_BINDING_PERIMETER_PROJECT` FOREIGN KEY (`PROJECT_ID`) REFERENCES PROJECT(PROJECT_ID), CONSTRAINT `FK_MILESTONE_BINDING_PERIMETER_MILESTONE` FOREIGN KEY (`MILESTONE_ID`) REFERENCES MILESTONE(MILESTONE_ID));

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('jsimon', 'Table for MilestoneBindingPerimeter', NOW(), 'Create Table', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feature-3609-1', '2.0.5', '3:c7ead5ace5583a01da639c5bd1de18d0', 342);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feature-3823-1::bsiri::(Checksum: 3:d0b201e944377deddef2a49348f8650f)
--  Creating the values table for multi-valued custom fields, much like CUSTOM_FIELD_OPTION is. 
--    	Note : the DELETE CASCADE on the foreign key is necessary because Hibernate won't do it (as specified, see HHH-5529)
CREATE TABLE `CUSTOM_FIELD_VALUE_OPTION` (`CFV_ID` BIGINT NOT NULL, `LABEL` VARCHAR(255) NOT NULL, `POSITION` INT NOT NULL, CONSTRAINT `fk_cfv_option_cfv` FOREIGN KEY (`CFV_ID`) REFERENCES CUSTOM_FIELD_VALUE(CFV_ID) ON DELETE CASCADE);

ALTER TABLE `CUSTOM_FIELD_VALUE_OPTION` COMMENT = 'The table.';

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('bsiri', 'Creating the values table for multi-valued custom fields, much like CUSTOM_FIELD_OPTION is. 
  	Note : the DELETE CASCADE on the foreign key is necessary because Hibernate won''t do it (as specified, see HHH-5529)', NOW(), 'Create Table', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feature-3823-1', '2.0.5', '3:d0b201e944377deddef2a49348f8650f', 343);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feature-3823-2::bsiri::(Checksum: 3:10e995d6ae6e884de3a56ea3089b9b6b)
--  Same table for the denormalized field values
CREATE TABLE `DENORMALIZED_FIELD_VALUE_OPTION` (`DFV_ID` BIGINT NOT NULL, `LABEL` VARCHAR(255) NOT NULL, `POSITION` INT NOT NULL, CONSTRAINT `fk_dfv_option_dfv` FOREIGN KEY (`DFV_ID`) REFERENCES DENORMALIZED_FIELD_VALUE(DFV_ID) ON DELETE CASCADE);

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('bsiri', 'Same table for the denormalized field values', NOW(), 'Create Table', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feature-3823-2', '2.0.5', '3:10e995d6ae6e884de3a56ea3089b9b6b', 344);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feature-3823-3::bsiri::(Checksum: 3:40b71e496b617a6e1643aea07b03b466)
--  tables CUSTOM_FIELD_OPTION and DENORMALIZED_FIELD_OPTION no longer enforce the option position.
ALTER TABLE `CUSTOM_FIELD_OPTION` MODIFY `POSITION` INT NULL;

ALTER TABLE `DENORMALIZED_FIELD_OPTION` MODIFY `POSITION` INT NULL;

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('bsiri', 'tables CUSTOM_FIELD_OPTION and DENORMALIZED_FIELD_OPTION no longer enforce the option position.', NOW(), 'Drop Not-Null Constraint (x2)', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feature-3823-3', '2.0.5', '3:40b71e496b617a6e1643aea07b03b466', 345);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.issue-4017-1::bsiri::(Checksum: 3:5682a9420e1160eef49f4838d79d4de8)
--  Some columns in REQUIREMENT_PROPERTY_CHANGE are too short compared to what 
--    	they are supposed to store. This changeset makes them bigger.
ALTER TABLE `REQUIREMENT_PROPERTY_CHANGE` MODIFY `OLD_VALUE` VARCHAR(255);

ALTER TABLE `REQUIREMENT_PROPERTY_CHANGE` MODIFY `NEW_VALUE` VARCHAR(255);

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('bsiri', 'Some columns in REQUIREMENT_PROPERTY_CHANGE are too short compared to what 
  	they are supposed to store. This changeset makes them bigger.', NOW(), 'Modify data type (x2)', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.issue-4017-1', '2.0.5', '3:5682a9420e1160eef49f4838d79d4de8', 346);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feat-4068-1::bsiri::(Checksum: 3:84795c97ecd084f4710471c4613447f8)
--  creating the table structure for parameterized list
CREATE TABLE `INFO_LIST` (`INFO_LIST_ID` BIGINT AUTO_INCREMENT NOT NULL, `LABEL` VARCHAR(100) NULL, `DESCRIPTION` LONGTEXT NULL, `CODE` VARCHAR(30) NOT NULL, `CREATED_BY` VARCHAR(50) NOT NULL, `CREATED_ON` DATETIME NOT NULL, `LAST_MODIFIED_BY` VARCHAR(50) DEFAULT null NULL, `LAST_MODIFIED_ON` DATETIME DEFAULT null NULL, CONSTRAINT `PK_INFO_LIST` PRIMARY KEY (`INFO_LIST_ID`), UNIQUE (`LABEL`), UNIQUE (`CODE`));

CREATE INDEX `idx_info_list_code` ON `INFO_LIST`(`CODE`);

CREATE TABLE `INFO_LIST_ITEM` (`ITEM_ID` BIGINT AUTO_INCREMENT NOT NULL, `ITEM_TYPE` VARCHAR(3) NOT NULL, `LIST_ID` BIGINT NULL, `ITEM_INDEX` INT NULL, `LABEL` VARCHAR(100) NOT NULL, `CODE` VARCHAR(30) NOT NULL, `IS_DEFAULT` TINYINT(1) DEFAULT 0 NOT NULL, `ICON_NAME` VARCHAR(100) NULL, CONSTRAINT `PK_INFO_LIST_ITEM` PRIMARY KEY (`ITEM_ID`), CONSTRAINT `fk_info_item_list` FOREIGN KEY (`LIST_ID`) REFERENCES INFO_LIST(INFO_LIST_ID), UNIQUE (`CODE`));

CREATE INDEX `idx_info_list_item_code` ON `INFO_LIST_ITEM`(`CODE`);

CREATE INDEX `idx_info_list_label` ON `INFO_LIST`(`LABEL`);

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('bsiri', 'creating the table structure for parameterized list', NOW(), 'Create Table, Create Index, Create Table, Create Index (x2)', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feat-4068-1', '2.0.5', '3:84795c97ecd084f4710471c4613447f8', 347);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feat-4068-2::bsiri::(Checksum: 3:a99934b9aa55714bcb7411ad75692d15)
--  Updating the definition of an execution
ALTER TABLE `EXECUTION` ADD `TC_NAT_LABEL` VARCHAR(100);

ALTER TABLE `EXECUTION` ADD `TC_NAT_CODE` VARCHAR(30);

ALTER TABLE `EXECUTION` ADD `TC_NAT_ICON_NAME` VARCHAR(100);

ALTER TABLE `EXECUTION` ADD `TC_TYP_LABEL` VARCHAR(100);

ALTER TABLE `EXECUTION` ADD `TC_TYP_CODE` VARCHAR(30);

ALTER TABLE `EXECUTION` ADD `TC_TYP_ICON_NAME` VARCHAR(100);

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('bsiri', 'Updating the definition of an execution', NOW(), 'Add Column', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feat-4068-2', '2.0.5', '3:a99934b9aa55714bcb7411ad75692d15', 348);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feat-4068-3::bsiri::(Checksum: 3:ff8906f1d84a632e135428a73ad6e8b9)
--  inserting the default lists in the database
INSERT INTO `INFO_LIST` (`CODE`, `CREATED_BY`, `CREATED_ON`, `DESCRIPTION`, `INFO_LIST_ID`, `LABEL`, `LAST_MODIFIED_BY`, `LAST_MODIFIED_ON`) VALUES ('DEF_REQ_CAT', 'system', '2010-01-01 00:00:00', '', '1', 'infolist.category.default', 'system', '2010-01-01 00:00:00');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('CAT_FUNCTIONAL', 'def_cat_functional', 0, '1', '0', 'SYS', 'requirement.category.CAT_FUNCTIONAL', '1');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('CAT_NON_FUNCTIONAL', 'def_cat_non-functional', 0, '2', '1', 'SYS', 'requirement.category.CAT_NON_FUNCTIONAL', '1');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('CAT_USE_CASE', 'def_cat_use-case', 0, '3', '2', 'SYS', 'requirement.category.CAT_USE_CASE', '1');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('CAT_BUSINESS', 'def_cat_business', 0, '4', '3', 'SYS', 'requirement.category.CAT_BUSINESS', '1');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('CAT_TEST_REQUIREMENT', 'def_cat_test-requirement', 0, '5', '4', 'SYS', 'requirement.category.CAT_TEST_REQUIREMENT', '1');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('CAT_UNDEFINED', 'def_cat_undefined', 1, '6', '5', 'SYS', 'requirement.category.CAT_UNDEFINED', '1');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('CAT_ERGONOMIC', 'def_cat_ergonomic', 0, '7', '6', 'SYS', 'requirement.category.CAT_ERGONOMIC', '1');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('CAT_PERFORMANCE', 'def_cat_performance', 0, '8', '7', 'SYS', 'requirement.category.CAT_PERFORMANCE', '1');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('CAT_TECHNICAL', 'def_cat_technical', 0, '9', '8', 'SYS', 'requirement.category.CAT_TECHNICAL', '1');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('CAT_USER_STORY', 'def_cat_user-story', 0, '10', '9', 'SYS', 'requirement.category.CAT_USER_STORY', '1');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('CAT_SECURITY', 'def_cat_security', 0, '11', '10', 'SYS', 'requirement.category.CAT_SECURITY', '1');

INSERT INTO `INFO_LIST` (`CODE`, `CREATED_BY`, `CREATED_ON`, `DESCRIPTION`, `INFO_LIST_ID`, `LABEL`, `LAST_MODIFIED_BY`, `LAST_MODIFIED_ON`) VALUES ('DEF_TC_NAT', 'system', '2010-01-01 00:00:00', '', '2', 'infolist.nature.default', 'system', '2010-01-01 00:00:00');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('NAT_UNDEFINED', 'noicon', 1, '12', '0', 'SYS', 'test-case.nature.NAT_UNDEFINED', '2');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('NAT_FUNCTIONAL_TESTING', 'noicon', 0, '13', '1', 'SYS', 'test-case.nature.NAT_FUNCTIONAL_TESTING', '2');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('NAT_BUSINESS_TESTING', 'noicon', 0, '14', '2', 'SYS', 'test-case.nature.NAT_BUSINESS_TESTING', '2');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('NAT_USER_TESTING', 'noicon', 0, '15', '3', 'SYS', 'test-case.nature.NAT_USER_TESTING', '2');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('NAT_NON_FUNCTIONAL_TESTING', 'noicon', 0, '16', '4', 'SYS', 'test-case.nature.NAT_NON_FUNCTIONAL_TESTING', '2');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('NAT_PERFORMANCE_TESTING', 'noicon', 0, '17', '5', 'SYS', 'test-case.nature.NAT_PERFORMANCE_TESTING', '2');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('NAT_SECURITY_TESTING', 'noicon', 0, '18', '6', 'SYS', 'test-case.nature.NAT_SECURITY_TESTING', '2');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('NAT_ATDD', 'noicon', 0, '19', '7', 'SYS', 'test-case.nature.NAT_ATDD', '2');

INSERT INTO `INFO_LIST` (`CODE`, `CREATED_BY`, `CREATED_ON`, `DESCRIPTION`, `INFO_LIST_ID`, `LABEL`, `LAST_MODIFIED_BY`, `LAST_MODIFIED_ON`) VALUES ('DEF_TC_TYP', 'system', '2010-01-01 00:00:00', '', '3', 'infolist.type.default', 'system', '2010-01-01 00:00:00');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('TYP_UNDEFINED', 'noicon', 1, '20', '0', 'SYS', 'test-case.type.TYP_UNDEFINED', '3');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('TYP_COMPLIANCE_TESTING', 'noicon', 0, '21', '1', 'SYS', 'test-case.type.TYP_COMPLIANCE_TESTING', '3');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('TYP_CORRECTION_TESTING', 'noicon', 0, '22', '2', 'SYS', 'test-case.type.TYP_CORRECTION_TESTING', '3');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('TYP_EVOLUTION_TESTING', 'noicon', 0, '23', '3', 'SYS', 'test-case.type.TYP_EVOLUTION_TESTING', '3');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('TYP_REGRESSION_TESTING', 'noicon', 0, '24', '4', 'SYS', 'test-case.type.TYP_REGRESSION_TESTING', '3');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('TYP_END_TO_END_TESTING', 'noicon', 0, '25', '5', 'SYS', 'test-case.type.TYP_END_TO_END_TESTING', '3');

INSERT INTO `INFO_LIST_ITEM` (`CODE`, `ICON_NAME`, `IS_DEFAULT`, `ITEM_ID`, `ITEM_INDEX`, `ITEM_TYPE`, `LABEL`, `LIST_ID`) VALUES ('TYP_PARTNER_TESTING', 'noicon', 0, '26', '6', 'SYS', 'test-case.type.TYP_PARTNER_TESTING', '3');

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('bsiri', 'inserting the default lists in the database', NOW(), 'Insert Row (x29)', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feat-4068-3', '2.0.5', '3:ff8906f1d84a632e135428a73ad6e8b9', 349);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feat-4068-4::bsiri::(Checksum: 3:7f89020c83570898822dc301bf8c6cfa)
--  other structural modifications
ALTER TABLE `PROJECT` ADD `REQ_CATEGORIES_LIST` BIGINT NOT NULL DEFAULT '1';

ALTER TABLE `PROJECT` ADD CONSTRAINT `proj_req_categories` FOREIGN KEY (`REQ_CATEGORIES_LIST`) REFERENCES `INFO_LIST` (`INFO_LIST_ID`);

ALTER TABLE `PROJECT` ADD `TC_NATURES_LIST` BIGINT NOT NULL DEFAULT '2';

ALTER TABLE `PROJECT` ADD CONSTRAINT `proj_tc_natures` FOREIGN KEY (`TC_NATURES_LIST`) REFERENCES `INFO_LIST` (`INFO_LIST_ID`);

ALTER TABLE `PROJECT` ADD `TC_TYPES_LIST` BIGINT NOT NULL DEFAULT '3';

ALTER TABLE `PROJECT` ADD CONSTRAINT `proj_tc_types` FOREIGN KEY (`TC_TYPES_LIST`) REFERENCES `INFO_LIST` (`INFO_LIST_ID`);

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('bsiri', 'other structural modifications', NOW(), 'Add Column', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feat-4068-4', '2.0.5', '3:7f89020c83570898822dc301bf8c6cfa', 350);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feat-4068-6::bsiri::(Checksum: 3:00562703c1781e21e3f8410c1f5b5653)
--  migrate the test cases
ALTER TABLE `TEST_CASE` CHANGE `TC_NATURE` `TC_NATURE_OLD` VARCHAR(30);

ALTER TABLE `TEST_CASE` ADD `TC_NATURE` BIGINT NOT NULL DEFAULT '12';

ALTER TABLE `TEST_CASE` ADD CONSTRAINT `fk_tc_nature` FOREIGN KEY (`TC_NATURE`) REFERENCES `INFO_LIST_ITEM` (`ITEM_ID`);

update TEST_CASE set TC_NATURE = 12 where TC_NATURE_OLD = 'UNDEFINED';

update TEST_CASE set TC_NATURE = 13 where TC_NATURE_OLD = 'FUNCTIONAL_TESTING';

update TEST_CASE set TC_NATURE = 14 where TC_NATURE_OLD = 'BUSINESS_TESTING';

update TEST_CASE set TC_NATURE = 15 where TC_NATURE_OLD = 'USER_TESTING';

update TEST_CASE set TC_NATURE = 16 where TC_NATURE_OLD = 'NON_FUNCTIONAL_TESTING';

update TEST_CASE set TC_NATURE = 17 where TC_NATURE_OLD = 'PERFORMANCE_TESTING';

update TEST_CASE set TC_NATURE = 18 where TC_NATURE_OLD = 'SECURITY_TESTING';

update TEST_CASE set TC_NATURE = 19 where TC_NATURE_OLD = 'ATDD';

ALTER TABLE `TEST_CASE` DROP COLUMN `TC_NATURE_OLD`;

ALTER TABLE `TEST_CASE` CHANGE `TC_TYPE` `TC_TYPE_OLD` VARCHAR(30);

ALTER TABLE `TEST_CASE` ADD `TC_TYPE` BIGINT NOT NULL DEFAULT '20';

ALTER TABLE `TEST_CASE` ADD CONSTRAINT `fk_tc_type` FOREIGN KEY (`TC_TYPE`) REFERENCES `INFO_LIST_ITEM` (`ITEM_ID`);

update TEST_CASE set TC_TYPE = 20 where TC_TYPE_OLD = 'UNDEFINED';

update TEST_CASE set TC_TYPE = 21 where TC_TYPE_OLD = 'COMPLIANCE_TESTING';

update TEST_CASE set TC_TYPE = 22 where TC_TYPE_OLD = 'CORRECTION_TESTING';

update TEST_CASE set TC_TYPE = 23 where TC_TYPE_OLD = 'EVOLUTION_TESTING';

update TEST_CASE set TC_TYPE = 24 where TC_TYPE_OLD = 'REGRESSION_TESTING';

update TEST_CASE set TC_TYPE = 25 where TC_TYPE_OLD = 'END_TO_END_TESTING';

update TEST_CASE set TC_TYPE = 26 where TC_TYPE_OLD = 'PARTNER_TESTING';

ALTER TABLE `TEST_CASE` DROP COLUMN `TC_TYPE_OLD`;

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('bsiri', 'migrate the test cases', NOW(), 'Rename Column, Add Column, Custom SQL, Drop Column, Rename Column, Add Column, Custom SQL, Drop Column', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feat-4068-6', '2.0.5', '3:00562703c1781e21e3f8410c1f5b5653', 351);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feat-4068-7::bsiri::(Checksum: 3:a7e3bf19f2a9795bd34d208f8a3b5c0e)
--  migrate the requirements
ALTER TABLE `REQUIREMENT_VERSION` CHANGE `CATEGORY` `CATEGORY_OLD` VARCHAR(30);

ALTER TABLE `REQUIREMENT_VERSION` ADD `CATEGORY` BIGINT NOT NULL DEFAULT '1';

ALTER TABLE `REQUIREMENT_VERSION` ADD CONSTRAINT `fk_req_nature` FOREIGN KEY (`CATEGORY`) REFERENCES `INFO_LIST_ITEM` (`ITEM_ID`);

update REQUIREMENT_VERSION set CATEGORY = 1 where CATEGORY_OLD = 'FUNCTIONAL';

update REQUIREMENT_VERSION set CATEGORY = 2 where CATEGORY_OLD = 'NON_FUNCTIONAL';

update REQUIREMENT_VERSION set CATEGORY = 3 where CATEGORY_OLD = 'USE_CASE';

update REQUIREMENT_VERSION set CATEGORY = 4 where CATEGORY_OLD = 'BUSINESS';

update REQUIREMENT_VERSION set CATEGORY = 5 where CATEGORY_OLD = 'TEST_REQUIREMENT';

update REQUIREMENT_VERSION set CATEGORY = 6 where CATEGORY_OLD = 'UNDEFINED';

update REQUIREMENT_VERSION set CATEGORY = 7 where CATEGORY_OLD = 'ERGONOMIC';

update REQUIREMENT_VERSION set CATEGORY = 8 where CATEGORY_OLD = 'PERFORMANCE';

update REQUIREMENT_VERSION set CATEGORY = 9 where CATEGORY_OLD = 'TECHNICAL';

update REQUIREMENT_VERSION set CATEGORY = 10 where CATEGORY_OLD = 'USER_STORY';

update REQUIREMENT_VERSION set CATEGORY = 11 where CATEGORY_OLD = 'SECURITY';

ALTER TABLE `REQUIREMENT_VERSION` DROP COLUMN `CATEGORY_OLD`;

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('bsiri', 'migrate the requirements', NOW(), 'Rename Column, Add Column, Custom SQL, Drop Column', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feat-4068-7', '2.0.5', '3:a7e3bf19f2a9795bd34d208f8a3b5c0e', 352);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feat-4068-8::bsiri::(Checksum: 3:b8affe1b87f9e96de5b10ccde72af5eb)
--  migrating the columns from EXECUTION
update EXECUTION
      set TC_NAT_LABEL = 'test-case.nature.NAT_UNDEFINED',
      TC_NAT_CODE = 'NAT_UNDEFINED',
      TC_NAT_ICON_NAME = 'noicon'
      where TC_NATURE='UNDEFINED';

update EXECUTION
      set TC_NAT_LABEL = 'test-case.nature.NAT_FUNCTIONAL_TESTING',
      TC_NAT_CODE = 'NAT_FUNCTIONAL_TESTING',
      TC_NAT_ICON_NAME = 'noicon'
      where TC_NATURE='FUNCTIONAL_TESTING';

update EXECUTION
      set TC_NAT_LABEL = 'test-case.nature.NAT_BUSINESS_TESTING',
      TC_NAT_CODE = 'NAT_BUSINESS_TESTING',
      TC_NAT_ICON_NAME = 'noicon'
      where TC_NATURE='BUSINESS_TESTING';

update EXECUTION
      set TC_NAT_LABEL = 'test-case.nature.NAT_USER_TESTING',
      TC_NAT_CODE = 'NAT_USER_TESTING',
      TC_NAT_ICON_NAME = 'noicon'
      where TC_NATURE='USER_TESTING';

update EXECUTION
      set TC_NAT_LABEL = 'test-case.nature.NAT_NON_FUNCTIONAL_TESTING',
      TC_NAT_CODE = 'NAT_NON_FUNCTIONAL_TESTING',
      TC_NAT_ICON_NAME = 'noicon'
      where TC_NATURE='NON_FUNCTIONAL_TESTING';

update EXECUTION
      set TC_NAT_LABEL = 'test-case.nature.NAT_PERFORMANCE_TESTING',
      TC_NAT_CODE = 'NAT_PERFORMANCE_TESTING',
      TC_NAT_ICON_NAME = 'noicon'
      where TC_NATURE='PERFORMANCE_TESTING';

update EXECUTION
      set TC_NAT_LABEL = 'test-case.nature.NAT_SECURITY_TESTING',
      TC_NAT_CODE = 'NAT_SECURITY_TESTING',
      TC_NAT_ICON_NAME = 'noicon'
      where TC_NATURE='SECURITY_TESTING';

update EXECUTION
      set TC_NAT_LABEL = 'test-case.nature.NAT_ATDD',
      TC_NAT_CODE = 'NAT_ATDD',
      TC_NAT_ICON_NAME = 'noicon'
      where TC_NATURE='ATDD';

update EXECUTION
      set TC_TYP_LABEL = 'test-case.type.TYP_UNDEFINED',
      TC_TYP_CODE = 'TYP_UNDEFINED',
      TC_TYP_ICON_NAME = 'noicon'
      where TC_TYPE='UNDEFINED';

update EXECUTION
      set TC_TYP_LABEL = 'test-case.type.TYP_COMPLIANCE_TESTING',
      TC_TYP_CODE = 'TYP_COMPLIANCE_TESTING',
      TC_TYP_ICON_NAME = 'noicon'
      where TC_TYPE='COMPLIANCE_TESTING';

update EXECUTION
      set TC_TYP_LABEL = 'test-case.type.TYP_CORRECTION_TESTING',
      TC_TYP_CODE = 'TYP_CORRECTION_TESTING',
      TC_TYP_ICON_NAME = 'noicon'
      where TC_TYPE='CORRECTION_TESTING';

update EXECUTION
      set TC_TYP_LABEL = 'test-case.type.TYP_EVOLUTION_TESTING',
      TC_TYP_CODE = 'TYP_EVOLUTION_TESTING',
      TC_TYP_ICON_NAME = 'noicon'
      where TC_TYPE='EVOLUTION_TESTING';

update EXECUTION
      set TC_TYP_LABEL = 'test-case.type.TYP_REGRESSION_TESTING',
      TC_TYP_CODE = 'TYP_REGRESSION_TESTING',
      TC_TYP_ICON_NAME = 'noicon'
      where TC_TYPE='REGRESSION_TESTING';

update EXECUTION
      set TC_TYP_LABEL = 'test-case.type.TYP_END_TO_END_TESTING',
      TC_TYP_CODE = 'TYP_END_TO_END_TESTING',
      TC_TYP_ICON_NAME = 'noicon'
      where TC_TYPE='END_TO_END_TESTING';

update EXECUTION
      set TC_TYP_LABEL = 'test-case.type.TYP_PARTNER_TESTING',
      TC_TYP_CODE = 'TYP_PARTNER_TESTING',
      TC_TYP_ICON_NAME = 'noicon'
      where TC_TYPE='PARTNER_TESTING';

ALTER TABLE `EXECUTION` DROP COLUMN `TC_NATURE`;

ALTER TABLE `EXECUTION` DROP COLUMN `TC_TYPE`;

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('bsiri', 'migrating the columns from EXECUTION', NOW(), 'Custom SQL, Drop Column (x2)', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feat-4068-8', '2.0.5', '3:b8affe1b87f9e96de5b10ccde72af5eb', 353);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feat-3764-1::flaurens::(Checksum: 3:21c3ab2714d4b811be9cc596b5dc110b)
--  Tables for OAuth2 Support
CREATE TABLE `oauth_client_details` (`CLIENT_ID` VARCHAR(255) NOT NULL, `CLIENT_SECRET` VARCHAR(255) NULL, `RESOURCE_IDS` VARCHAR(255) DEFAULT null NULL, `SCOPE` VARCHAR(255) DEFAULT 'location,locationhistory' NULL, `AUTHORIZED_GRANT_TYPES` VARCHAR(255) DEFAULT 'password,authorization_code,refresh_token,implicit' NULL, `WEB_SERVER_REDIRECT_URI` VARCHAR(255) DEFAULT null NULL, `AUTHORITIES` VARCHAR(255) DEFAULT 'ROLE_CLIENT, ROLE_TRUSTED_CLIENT' NULL, `ACCESS_TOKEN_VALIDITY` BIGINT DEFAULT 60 NULL, `REFRESH_TOKEN_VALIDITY` BIGINT DEFAULT NULL NULL, `ADDITIONAL_INFORMATION` LONGTEXT DEFAULT null NULL, `AUTOAPPROVE` VARCHAR(255) NULL, CONSTRAINT `PK_OAUTH_CLIENT_DETAILS` PRIMARY KEY (`CLIENT_ID`));

CREATE TABLE `oauth_client_token` (`TOKEN_ID` VARCHAR(255) NOT NULL, `TOKEN` BLOB NULL, `AUTHENTICATION_ID` VARCHAR(255) NULL, `USER_NAME` VARCHAR(255) NULL, `CLIENT_ID` VARCHAR(255) NULL, CONSTRAINT `PK_OAUTH_CLIENT_TOKEN` PRIMARY KEY (`TOKEN_ID`), UNIQUE (`AUTHENTICATION_ID`));

CREATE TABLE `oauth_access_token` (`TOKEN_ID` VARCHAR(255) NOT NULL, `TOKEN` BLOB NULL, `AUTHENTICATION_ID` VARCHAR(255) NULL, `USER_NAME` VARCHAR(255) NULL, `CLIENT_ID` VARCHAR(255) NULL, `AUTHENTICATION` BLOB NULL, `REFRESH_TOKEN` VARCHAR(255) NULL, CONSTRAINT `PK_OAUTH_ACCESS_TOKEN` PRIMARY KEY (`TOKEN_ID`), UNIQUE (`AUTHENTICATION_ID`));

CREATE TABLE `oauth_refresh_token` (`TOKEN_ID` VARCHAR(255) NOT NULL, `TOKEN` BLOB NULL, `AUTHENTICATION` BLOB NULL, CONSTRAINT `PK_OAUTH_REFRESH_TOKEN` PRIMARY KEY (`TOKEN_ID`));

CREATE TABLE `oauth_code` (`CODE` VARCHAR(255) NOT NULL, `AUTHENTICATION` BLOB NULL, CONSTRAINT `PK_OAUTH_CODE` PRIMARY KEY (`CODE`));

CREATE TABLE `oauth_approvals` (`USERID` VARCHAR(255) NOT NULL, `CLIENTID` VARCHAR(255) NOT NULL, `SCOPE` VARCHAR(255) NULL, `STATUS` VARCHAR(10) NULL, `EXPIRESAT` DATETIME NULL, `LASTMODIFIEDAT` DATETIME NULL);

ALTER TABLE `oauth_approvals` ADD PRIMARY KEY (`USERID`, `CLIENTID`);

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('flaurens', 'Tables for OAuth2 Support', NOW(), 'Create Table (x6), Add Primary Key', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feat-3764-1', '2.0.5', '3:21c3ab2714d4b811be9cc596b5dc110b', 354);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feat-4171-1::jsimon::(Checksum: 3:dd54d7c418be3b34e621732aeec03876)
INSERT INTO `CORE_CONFIG` (`STR_KEY`, `VALUE`) VALUES ('uploadfilter.fileExtensions.whitelist', 'txt, doc, xls, ppt, docx, xlsx, pptx, odt, ods, odp, pdf');

INSERT INTO `CORE_CONFIG` (`STR_KEY`, `VALUE`) VALUES ('uploadfilter.upload.sizeLimitInBytes', '4000000');

INSERT INTO `CORE_CONFIG` (`STR_KEY`, `VALUE`) VALUES ('uploadfilter.upload.import.sizeLimitInBytes', '2000000');

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('jsimon', '', NOW(), 'Insert Row (x3)', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feat-4171-1', '2.0.5', '3:dd54d7c418be3b34e621732aeec03876', 355);

--  Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml::tm-1.12.0.feat-3611-1::bsiri::(Checksum: 3:d1140a9da46292ae1e018a543c387b8d)
--  Creating the tables modeling the relationships between milestones and test cases, requirement versions 
--      		and campaigns
CREATE TABLE `MILESTONE_TEST_CASE` (`MILESTONE_ID` BIGINT NOT NULL, `TEST_CASE_ID` BIGINT NOT NULL, CONSTRAINT `milestone_tc_milestone` FOREIGN KEY (`MILESTONE_ID`) REFERENCES MILESTONE(MILESTONE_ID), CONSTRAINT `milestone_tc_tc` FOREIGN KEY (`TEST_CASE_ID`) REFERENCES TEST_CASE(TCLN_ID));

CREATE TABLE `MILESTONE_REQ_VERSION` (`MILESTONE_ID` BIGINT NOT NULL, `REQ_VERSION_ID` BIGINT NOT NULL, CONSTRAINT `milestone_rqv_milestone` FOREIGN KEY (`MILESTONE_ID`) REFERENCES MILESTONE(MILESTONE_ID), CONSTRAINT `milestone_rqv_rqv` FOREIGN KEY (`REQ_VERSION_ID`) REFERENCES REQUIREMENT_VERSION(RES_ID));

CREATE TABLE `MILESTONE_CAMPAIGN` (`MILESTONE_ID` BIGINT NOT NULL, `CAMPAIGN_ID` BIGINT NOT NULL, CONSTRAINT `milestone_camp_camp` FOREIGN KEY (`CAMPAIGN_ID`) REFERENCES CAMPAIGN(CLN_ID), CONSTRAINT `milestone_camp_milestone` FOREIGN KEY (`MILESTONE_ID`) REFERENCES MILESTONE(MILESTONE_ID));

INSERT INTO `DATABASECHANGELOG` (`AUTHOR`, `COMMENTS`, `DATEEXECUTED`, `DESCRIPTION`, `EXECTYPE`, `FILENAME`, `ID`, `LIQUIBASE`, `MD5SUM`, `ORDEREXECUTED`) VALUES ('bsiri', 'Creating the tables modeling the relationships between milestones and test cases, requirement versions 
    		and campaigns', NOW(), 'Create Table (x3)', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.12.0.xml', 'tm-1.12.0.feat-3611-1', '2.0.5', '3:d1140a9da46292ae1e018a543c387b8d', 356);

--  Release Database Lock
--  Release Database Lock
