From 3196f69ffb80ea001de063590530880428db21d9 Mon Sep 17 00:00:00 2001
From: "j.goderbauer" <j.goderbauer@adito.de>
Date: Mon, 28 Sep 2020 10:36:44 +0200
Subject: [PATCH] =?UTF-8?q?[Projekt:=20Entwicklung=20-=20Neon][TicketNr.:?=
 =?UTF-8?q?=201066090][liquibase=20update=20von=202020.1.0=20auf=202020.2.?=
 =?UTF-8?q?0=20schl=C3=A4gt=20bei=20MS=20SQL=20fehl]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../alter_ComunicationMedium_IdDatatype.xml     |  4 ++++
 ...alter_DocumentTemplatePlaceOfUseDatatype.xml |  3 +++
 .../alter_ExportTemplateDatatype.xml            | 17 +++++++++++++++++
 .../basic/2020.2.0/ImportFields/alterLead.xml   |  6 +++---
 4 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/.liquibase/Data_alias/basic/2020.1.2/AlterDatatypeOfKeyColumnsToChar/alter_ComunicationMedium_IdDatatype.xml b/.liquibase/Data_alias/basic/2020.1.2/AlterDatatypeOfKeyColumnsToChar/alter_ComunicationMedium_IdDatatype.xml
index 7153295dc1..733b8a0729 100644
--- a/.liquibase/Data_alias/basic/2020.1.2/AlterDatatypeOfKeyColumnsToChar/alter_ComunicationMedium_IdDatatype.xml
+++ b/.liquibase/Data_alias/basic/2020.1.2/AlterDatatypeOfKeyColumnsToChar/alter_ComunicationMedium_IdDatatype.xml
@@ -11,7 +11,11 @@
     </changeSet>
     
     <changeSet dbms="!derby" author="b.ulrich" id="17c1eb73-3131-4a2b-bf9a-913590767c79">
+        <dropIndex  tableName="COMMUNICATION" indexName="IDX_COMMUNICATION_MEDIUM_ID"/>
         <modifyDataType tableName="COMMUNICATION" columnName="MEDIUM_ID" newDataType="CHAR(36)"/>
+        <createIndex indexName="IDX_COMMUNICATION_MEDIUM_ID" tableName="COMMUNICATION">
+            <column name="MEDIUM_ID"/>
+        </createIndex>
     </changeSet>
 
 </databaseChangeLog>
diff --git a/.liquibase/Data_alias/basic/2020.1.2/AlterDatatypeOfKeyColumnsToChar/alter_DocumentTemplatePlaceOfUseDatatype.xml b/.liquibase/Data_alias/basic/2020.1.2/AlterDatatypeOfKeyColumnsToChar/alter_DocumentTemplatePlaceOfUseDatatype.xml
index 2cfda5e78c..9e31af2c94 100644
--- a/.liquibase/Data_alias/basic/2020.1.2/AlterDatatypeOfKeyColumnsToChar/alter_DocumentTemplatePlaceOfUseDatatype.xml
+++ b/.liquibase/Data_alias/basic/2020.1.2/AlterDatatypeOfKeyColumnsToChar/alter_DocumentTemplatePlaceOfUseDatatype.xml
@@ -14,6 +14,9 @@
     </changeSet>
     
     <changeSet dbms="!derby" author="b.ulrich" id="85ba6a61-9318-4118-ac4c-e33730f6581d">
+        <dropPrimaryKey tableName="DOCUMENTTEMPLATE" constraintName="PK_DOCUMENTTEMPLATE_DOCUMENTTEMPLATEID" dropIndex="true"/>
         <modifyDataType tableName="DOCUMENTTEMPLATE" columnName="DOCUMENTTEMPLATEID" newDataType="CHAR(36)"/>
+        <addNotNullConstraint columnName="DOCUMENTTEMPLATEID" tableName="DOCUMENTTEMPLATE" columnDataType="CHAR(36)" validate="true"/>
+        <addPrimaryKey tableName="DOCUMENTTEMPLATE" constraintName="PK_DOCUMENTTEMPLATE_DOCUMENTTEMPLATEID" columnNames="DOCUMENTTEMPLATEID"/>
     </changeSet>
 </databaseChangeLog>
diff --git a/.liquibase/Data_alias/basic/2020.1.2/AlterDatatypeOfKeyColumnsToChar/alter_ExportTemplateDatatype.xml b/.liquibase/Data_alias/basic/2020.1.2/AlterDatatypeOfKeyColumnsToChar/alter_ExportTemplateDatatype.xml
index 237c9fd9e4..116ed24246 100644
--- a/.liquibase/Data_alias/basic/2020.1.2/AlterDatatypeOfKeyColumnsToChar/alter_ExportTemplateDatatype.xml
+++ b/.liquibase/Data_alias/basic/2020.1.2/AlterDatatypeOfKeyColumnsToChar/alter_ExportTemplateDatatype.xml
@@ -19,8 +19,25 @@
     </changeSet>
     
     <changeSet dbms="!derby" author="b.ulrich" id="a53a2f38-3788-44a2-a151-13b3853ccb74">
+        <!--EXPORTTEMPLATEPLACEOFUSE.EXPORTTEMPLATE_ID-->
+        <dropIndex  tableName="EXPORTTEMPLATEPLACEOFUSE" indexName="idx_exprttmppou_tmpltid"/>
         <modifyDataType tableName="EXPORTTEMPLATEPLACEOFUSE" columnName="EXPORTTEMPLATE_ID" newDataType="CHAR(36)"/>
+        <createIndex indexName="idx_exprttmppou_tmpltid" tableName="EXPORTTEMPLATEPLACEOFUSE">
+            <column name="EXPORTTEMPLATE_ID"/>
+        </createIndex>
+        
+        <!--EXPORTTEMPLATEFIELD.EXPORTTEMPLATE_ID-->
+        <dropIndex  tableName="EXPORTTEMPLATEFIELD" indexName="idx_exprttmpfld_tmpltid"/>
         <modifyDataType tableName="EXPORTTEMPLATEFIELD" columnName="EXPORTTEMPLATE_ID" newDataType="CHAR(36)"/>
+        <createIndex indexName="idx_exprttmpfld_tmpltid" tableName="EXPORTTEMPLATEFIELD">
+            <column name="EXPORTTEMPLATE_ID"/>
+        </createIndex>
+        
+        <!--EXPORTTEMPLATESELECTION.EXPORTTEMPLATE_ID-->
+        <dropIndex  tableName="EXPORTTEMPLATESELECTION" indexName="idx_exprttmpselection_tmpltid"/>
         <modifyDataType tableName="EXPORTTEMPLATESELECTION" columnName="EXPORTTEMPLATE_ID" newDataType="CHAR(36)"/>
+        <createIndex indexName="idx_exprttmpselection_tmpltid" tableName="EXPORTTEMPLATESELECTION">
+            <column name="EXPORTTEMPLATE_ID"/>
+        </createIndex>
     </changeSet>
 </databaseChangeLog>
diff --git a/.liquibase/Data_alias/basic/2020.2.0/ImportFields/alterLead.xml b/.liquibase/Data_alias/basic/2020.2.0/ImportFields/alterLead.xml
index 1c2fd454c2..b1e24d4555 100644
--- a/.liquibase/Data_alias/basic/2020.2.0/ImportFields/alterLead.xml
+++ b/.liquibase/Data_alias/basic/2020.2.0/ImportFields/alterLead.xml
@@ -2,8 +2,8 @@
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
     <changeSet author="s.pongratz" id="99f19a82-62aa-41fc-b756-da4da3be45de">
-         <sql>
-            ALTER TABLE LEAD ADD COLUMN ATTRIBUTE_Industry VARCHAR(100);
-        </sql>
+        <addColumn tableName="LEAD">
+            <column name="ATTRIBUTE_Industry" type="VARCHAR(100)"/>
+        </addColumn>
     </changeSet>
 </databaseChangeLog>
-- 
GitLab