From f6749dcbe462c442b3f04ca9c71ab0273a35d63f Mon Sep 17 00:00:00 2001
From: "a.schindlbeck" <a.schindlbeck@adito.de>
Date: Tue, 9 Apr 2019 10:24:30 +0200
Subject: [PATCH] liquibase: Auftrennung der Notification-Table in zwei Tables

---
 .../_____SYSTEMALIAS/basic/init/init.xml      | 29 ++++++++++---------
 .../create_asys_notificationcontents.xml      | 22 ++++++++++++++
 .../init/struct/create_asys_notifications.xml | 23 ++++++++++++++-
 3 files changed, 59 insertions(+), 15 deletions(-)
 create mode 100644 others/db_changes/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml

diff --git a/others/db_changes/_____SYSTEMALIAS/basic/init/init.xml b/others/db_changes/_____SYSTEMALIAS/basic/init/init.xml
index 4e94f25438..8f84223116 100644
--- a/others/db_changes/_____SYSTEMALIAS/basic/init/init.xml
+++ b/others/db_changes/_____SYSTEMALIAS/basic/init/init.xml
@@ -1,18 +1,19 @@
 <?xml version="1.1" encoding="UTF-8" standalone="no"?>
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
-    <include file="struct/create_asys_aliasconfig.xml"/>
-    <include file="struct/create_asys_binaries.xml"/>
-    <include file="struct/create_asys_dashletconfigurations.xml"/>
-    <include file="struct/create_asys_dashlets.xml"/>
-    <include file="struct/create_asys_notifications.xml"/>
-    <include file="struct/create_asys_sequences.xml"/>
-    <include file="struct/create_asys_system.xml"/>
-    <include file="struct/create_asys_timer.xml"/>
-    <include file="struct/create_asys_users.xml"/>
-    <include file="struct/create_asys_calendarbackend.xml"/>
-    <include file="struct/create_asys_calendarlink.xml"/>
+    <include relativeToChangelogFile="true" file="struct/create_asys_aliasconfig.xml"/>
+    <include relativeToChangelogFile="true" file="struct/create_asys_binaries.xml"/>
+    <include relativeToChangelogFile="true" file="struct/create_asys_dashletconfigurations.xml"/>
+    <include relativeToChangelogFile="true" file="struct/create_asys_dashlets.xml"/>
+    <include relativeToChangelogFile="true" file="struct/create_asys_notifications.xml"/>
+    <include relativeToChangelogFile="true" file="struct/create_asys_notificationcontents.xml"/>
+    <include relativeToChangelogFile="true" file="struct/create_asys_sequences.xml"/>
+    <include relativeToChangelogFile="true" file="struct/create_asys_system.xml"/>
+    <include relativeToChangelogFile="true" file="struct/create_asys_timer.xml"/>
+    <include relativeToChangelogFile="true" file="struct/create_asys_users.xml"/>
+    <include relativeToChangelogFile="true" file="struct/create_asys_calendarbackend.xml"/>
+    <include relativeToChangelogFile="true" file="struct/create_asys_calendarlink.xml"/>
     
-    <include file="data/insert_asys_aliasconfig.xml"/>
-    <include file="data/insert_asys_system.xml"/>
-    <include file="data/insert_asys_users-admin.xml"/>
+    <include relativeToChangelogFile="true" file="data/insert_asys_aliasconfig.xml"/>
+    <include relativeToChangelogFile="true" file="data/insert_asys_system.xml"/>
+    <include relativeToChangelogFile="true" file="data/insert_asys_users-admin.xml"/>
 </databaseChangeLog>
diff --git a/others/db_changes/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml b/others/db_changes/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml
new file mode 100644
index 0000000000..83818826de
--- /dev/null
+++ b/others/db_changes/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml
@@ -0,0 +1,22 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+<changeSet author="a.schindlbeck" id="6b25f062-fb39-4230-9348-b67ec5ec45a1">
+    <createTable tableName="ASYS_NOTIFICATIONCONTENTS">
+        <column name="CONTENTID" type="CHAR(36)">
+            <constraints primaryKey="true" primaryKeyName="PK_ASYS_NOTIFICATIONCONTENTS_CONTENTID"/>
+        </column>
+        <column name="BACKPACK" type="CLOB"/>
+        <column name="CAPTION" type="VARCHAR(512)"/>
+        <column name="CREATIONDATE" type="BIGINT"/>
+        <column name="DESCRIPTION" type="VARCHAR(1023)"/>
+        <column name="FORCEDPRIORITY" type="INTEGER"/>
+        <column name="ICON_INFO" type="VARCHAR(1023)"/>
+        <column name="LIFETIME" type="BIGINT"/>
+        <column name="LINK_INFO" type="VARCHAR(1023)"/>
+        <column name="ORIGINATORNAME" type="VARCHAR(63)"/>
+        <column name="RECIPIENTUSERIDS" type="CLOB"/>
+        <column name="TYPECODE" type="VARCHAR(63)"/>
+        <column name="VERSION" type="INTEGER"/>
+    </createTable>
+</changeSet>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/others/db_changes/_____SYSTEMALIAS/basic/init/struct/create_asys_notifications.xml b/others/db_changes/_____SYSTEMALIAS/basic/init/struct/create_asys_notifications.xml
index bd57a5ed46..afa32c0c34 100644
--- a/others/db_changes/_____SYSTEMALIAS/basic/init/struct/create_asys_notifications.xml
+++ b/others/db_changes/_____SYSTEMALIAS/basic/init/struct/create_asys_notifications.xml
@@ -1,3 +1,22 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+<changeSet author="a.schindlbeck" id="98f057b6-0140-4edd-b08d-9cc7cf178bab">
+    <createTable tableName="ASYS_NOTIFICATIONS">
+        <column name="ID" type="CHAR(36)">
+            <constraints primaryKey="true" primaryKeyName="PK_ASYS_NOTIFICATIONS_ID"/>
+        </column>
+        <column name="CONTENTID" type="VARCHAR(512)"/>
+        <column name="STATE" type="VARCHAR(16)"/>
+        <column name="USERID" type="VARCHAR(63)"/>
+    </createTable>
+</changeSet>
+</databaseChangeLog>
+
+
+<!--
+
+OLD VERSION
+
 <?xml version="1.1" encoding="UTF-8" standalone="no"?>
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
 <changeSet author="j.hoermann" id="98f057b6-0140-4edd-b08d-9cc7cf178bab">
@@ -22,4 +41,6 @@
         <column name="VERSION" type="INTEGER"/>
     </createTable>
 </changeSet>
-</databaseChangeLog>
\ No newline at end of file
+</databaseChangeLog>
+
+-->
\ No newline at end of file
-- 
GitLab