-- *********************************************************************
-- 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.14.0.xml
-- Ran at: 03/04/20 12:06
-- Against: liquibase@jdbc:postgresql://localhost:5432/squash_dist_cur
-- 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.14.0.xml::tm-1.14.0::bsiri::(Checksum: 3:233750f7f586a7f292383730fac15223)
-- Update TM database version number
UPDATE CORE_CONFIG SET VALUE = '1.14.0' 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-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.14.0.xml', 'tm-1.14.0', '2.0.5', '3:233750f7f586a7f292383730fac15223', 389);

-- Changeset /var/lib/jenkins/jobs/build-squash-tm-distros-1.21/workspace/standalone/target/maven-shared-archive-resources/tm/tm.changelog-1.14.0.xml::tm-1.14.0-feature-5416::jthebault::(Checksum: 3:28a6956bad8e3f958f195ca715ab561f)
CREATE TABLE PARTY_PREFERENCE (PREFERENCE_ID bigserial NOT NULL, PARTY_ID BIGINT NOT NULL, PREFERENCE_KEY VARCHAR(50), PREFERENCE_VALUE VARCHAR(5000), CONSTRAINT PK_PARTY_PREFERENCE PRIMARY KEY (PREFERENCE_ID), CONSTRAINT fk_party_preference_core_party_party_id FOREIGN KEY (PARTY_ID) REFERENCES CORE_PARTY(PARTY_ID));

COMMENT ON COLUMN PARTY_PREFERENCE.PARTY_ID IS 'foreign key to the core_party table';

INSERT INTO databasechangelog (AUTHOR, COMMENTS, DATEEXECUTED, DESCRIPTION, EXECTYPE, FILENAME, ID, LIQUIBASE, MD5SUM, ORDEREXECUTED) VALUES ('jthebault', '', 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.14.0.xml', 'tm-1.14.0-feature-5416', '2.0.5', '3:28a6956bad8e3f958f195ca715ab561f', 390);

-- Release Database Lock
-- Release Database Lock
