-- *********************************************************************
-- Update Database Script
-- *********************************************************************
-- Change Log: /var/lib/jenkins/jobs/build-squash-tm-distros/workspace/standalone/target/maven-shared-archive-resources/upgrade/upgrade.changelog-up-to-1.10.3.xml
-- Ran at: 04/03/15 11:45
-- Against: SA@jdbc:h2:/var/lib/jenkins/jobs/build-squash-tm-distros/workspace/standalone/target/incremental-upgrade-database/squash-tm
-- Liquibase version: 2.0.5
-- *********************************************************************

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

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

-- Changeset /var/lib/jenkins/jobs/build-squash-tm-distros/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.10.3.xml::tm-1.10.3-issue-3807-3808-1::bsiri::(Checksum: 3:3f34b003a00e3d66ba23ebb758d49e6f)
-- Adding much needed indexes
CREATE INDEX idx_cfv_entity_id ON CUSTOM_FIELD_VALUE(BOUND_ENTITY_ID);

CREATE INDEX idx_cfv_entity_type ON CUSTOM_FIELD_VALUE(BOUND_ENTITY_TYPE);

CREATE INDEX idx_dfv_entity_id ON DENORMALIZED_FIELD_VALUE(DENORMALIZED_FIELD_HOLDER_ID);

CREATE INDEX idx_dfv_entity_type ON DENORMALIZED_FIELD_VALUE(DENORMALIZED_FIELD_HOLDER_TYPE);

INSERT INTO DATABASECHANGELOG (AUTHOR, COMMENTS, DATEEXECUTED, DESCRIPTION, EXECTYPE, FILENAME, ID, LIQUIBASE, MD5SUM, ORDEREXECUTED) VALUES ('bsiri', 'Adding much needed indexes', NOW(), 'Create Index (x4)', 'EXECUTED', '/var/lib/jenkins/jobs/build-squash-tm-distros/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.10.3.xml', 'tm-1.10.3-issue-3807-3808-1', '2.0.5', '3:3f34b003a00e3d66ba23ebb758d49e6f', 321);

-- Release Database Lock
-- Release Database Lock
