From dfdf208a9eb2b6ac1b1c72a17a3ad42afbc277c5 Mon Sep 17 00:00:00 2001 From: "d.lechner" <d.lechner@adito.de> Date: Thu, 11 Apr 2019 09:59:37 +0200 Subject: [PATCH] Fixes after merge --- .../Data_alias/basic/2019.2/changelog.xml | 5 +- .../basic/2019.2/create_documenttemplate.xml | 0 .../2019.2/create_documenttemplatelink.xml | 0 .../2019.2/data/init_DocumentTemplateType.xml | 41 +++++++++ .../AditoBasic/init_DocumentTemplateType.xml | 35 -------- others/db_changes/readme.adoc | 88 ------------------- process/blobHandler/blobHandler.aod | 4 +- 7 files changed, 44 insertions(+), 129 deletions(-) rename {others/db_changes => .liquibase}/Data_alias/basic/2019.2/create_documenttemplate.xml (100%) rename {others/db_changes => .liquibase}/Data_alias/basic/2019.2/create_documenttemplatelink.xml (100%) create mode 100644 .liquibase/Data_alias/basic/2019.2/data/init_DocumentTemplateType.xml delete mode 100644 others/db_changes/Data_alias/basic/2019.2/data/AditoBasic/init_DocumentTemplateType.xml delete mode 100644 others/db_changes/readme.adoc diff --git a/.liquibase/Data_alias/basic/2019.2/changelog.xml b/.liquibase/Data_alias/basic/2019.2/changelog.xml index 5d7b680705..3f53b27640 100644 --- a/.liquibase/Data_alias/basic/2019.2/changelog.xml +++ b/.liquibase/Data_alias/basic/2019.2/changelog.xml @@ -136,9 +136,8 @@ <!-- Derby needs special handling --> <include relativeToChangelogFile="true" file="alter_activityLink_notDerby.xml" /> <include relativeToChangelogFile="true" file="alter_activityLink_Derby.xml" /> -</databaseChangeLog> - + <include relativeToChangelogFile="true" file="create_documenttemplate.xml"/> <include relativeToChangelogFile="true" file="create_documenttemplatelink.xml"/> - <include relativeToChangelogFile="true" file="data/AditoBasic/init_DocumentTemplateType.xml"/> + <include relativeToChangelogFile="true" file="data/init_DocumentTemplateType.xml"/> </databaseChangeLog> \ No newline at end of file diff --git a/others/db_changes/Data_alias/basic/2019.2/create_documenttemplate.xml b/.liquibase/Data_alias/basic/2019.2/create_documenttemplate.xml similarity index 100% rename from others/db_changes/Data_alias/basic/2019.2/create_documenttemplate.xml rename to .liquibase/Data_alias/basic/2019.2/create_documenttemplate.xml diff --git a/others/db_changes/Data_alias/basic/2019.2/create_documenttemplatelink.xml b/.liquibase/Data_alias/basic/2019.2/create_documenttemplatelink.xml similarity index 100% rename from others/db_changes/Data_alias/basic/2019.2/create_documenttemplatelink.xml rename to .liquibase/Data_alias/basic/2019.2/create_documenttemplatelink.xml diff --git a/.liquibase/Data_alias/basic/2019.2/data/init_DocumentTemplateType.xml b/.liquibase/Data_alias/basic/2019.2/data/init_DocumentTemplateType.xml new file mode 100644 index 0000000000..04d8759177 --- /dev/null +++ b/.liquibase/Data_alias/basic/2019.2/data/init_DocumentTemplateType.xml @@ -0,0 +1,41 @@ +<?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="d.lechner" id="documentTemplateType-1"> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="c564719a-18ef-423e-b130-dp88b2b518ad"/> + <column name="KEYID" value="LET"/> + <column name="TITLE" value="Letter"/> + <column name="CONTAINER" value="DocumentTemplateType"/> + <column name="SORTING" valueNumeric="0"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="0"/> + </insert> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="6f4c6e49-36ca-4b98-ba83-c507203wawal"/> + <column name="KEYID" value="MAI"/> + <column name="TITLE" value="Mail"/> + <column name="CONTAINER" value="DocumentTemplateType"/> + <column name="SORTING" valueNumeric="1"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="0"/> + </insert> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="bb386131-ee36-9771-b458-6751f137a941"/> + <column name="KEYID" value="ATT"/> + <column name="TITLE" value="Attachment"/> + <column name="CONTAINER" value="DocumentTemplateType"/> + <column name="SORTING" valueNumeric="2"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="0"/> + </insert> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="bb38aa51-ee36-9771-b458-6751f137a941"/> + <column name="KEYID" value="TEX"/> + <column name="TITLE" value="Text Modular"/> + <column name="CONTAINER" value="DocumentTemplateType"/> + <column name="SORTING" valueNumeric="3"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="0"/> + </insert> + </changeSet> +</databaseChangeLog> diff --git a/others/db_changes/Data_alias/basic/2019.2/data/AditoBasic/init_DocumentTemplateType.xml b/others/db_changes/Data_alias/basic/2019.2/data/AditoBasic/init_DocumentTemplateType.xml deleted file mode 100644 index 448f72ab56..0000000000 --- a/others/db_changes/Data_alias/basic/2019.2/data/AditoBasic/init_DocumentTemplateType.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?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="44c06ef1-d9b7-4c5a-a3ee-276ed84caca3"> - <delete tableName="AB_OBJECTRELATION"/> - - <insert tableName="AB_OBJECTRELATION"> - <column name="AB_OBJECTRELATIONID" value="1a67eaa7-21da-4a18-97ab-755ac5cb74f7"/> - <column name="OBJECT1_ROWID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/> - <column name="OBJECT2_ROWID" value="f0fb7676-8183-4bc7-beca-ca32c1e11c10"/> - <column name="AB_OBJECTRELATIONTYPE1" value="c74ad02c-1db9-4f47-8691-aba349dbe316"/> - <column name="AB_OBJECTRELATIONTYPE2" value="b3b85332-1c86-4cd8-a3b9-34c49c51f01a"/> - </insert> - <insert tableName="AB_OBJECTRELATION"> - <column name="AB_OBJECTRELATIONID" value="85ad4578-dce2-49df-a844-d162f1bd9f2f"/> - <column name="OBJECT1_ROWID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/> - <column name="OBJECT2_ROWID" value="4a55726c-4ca6-43cb-9d3f-8e55d97b7aaf"/> - <column name="AB_OBJECTRELATIONTYPE1" value="090f6adc-c2b8-44b7-8c61-39dbb5660aa0"/> - <column name="AB_OBJECTRELATIONTYPE2" value="090f6adc-c2b8-44b7-8c61-39dbb5660aa0"/> - </insert> - <insert tableName="AB_OBJECTRELATION"> - <column name="AB_OBJECTRELATIONID" value="5c545235-231f-4082-9e74-4ec4512eb98d"/> - <column name="OBJECT1_ROWID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/> - <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/> - <column name="AB_OBJECTRELATIONTYPE1" value="9d4739ba-33b0-4e87-b281-561e2cbdd277"/> - <column name="AB_OBJECTRELATIONTYPE2" value="e397b595-38ae-4365-908e-75ee388838eb"/> - </insert> - <insert tableName="AB_OBJECTRELATION"> - <column name="AB_OBJECTRELATIONID" value="4c9bc7f3-c13b-4e55-9c23-012ba40196c9"/> - <column name="OBJECT1_ROWID" value="e6da1393-f46b-41a4-826b-2c7d22de2246"/> - <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/> - <column name="AB_OBJECTRELATIONTYPE1" value="3cee0474-504f-43cc-844a-715f1a0db271"/> - <column name="AB_OBJECTRELATIONTYPE2" value="fa879afd-b2c5-4eee-9799-d63c6764b348"/> - </insert> - </changeSet> -</databaseChangeLog> \ No newline at end of file diff --git a/others/db_changes/readme.adoc b/others/db_changes/readme.adoc deleted file mode 100644 index 240dfacc50..0000000000 --- a/others/db_changes/readme.adoc +++ /dev/null @@ -1,88 +0,0 @@ -liquibase-readme -================ - -== TODO: update to new Structure == - -== Structure within ADITO -=== in theory - -When using liquibase in an ADITO-System, your project structure _should_ look like this: ----- -PROJECTHOME/others/db_changes/masterChangelog.xml -PROJECTHOME/others/db_changes/struct/ -PROJECTHOME/others/db_changes/data/ -PROJECTHOME/others/db_changes/misc/ -PROJECTHOME/others/db_changes/liquibase.properties ----- - -The file `masterChangelog.xml` contains a list of all changes (well, in fact more like a list of all changelog-files). The structure could look like this: -[source,xml] ----- -<?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_org.xml"/> - <include file="data/example_org.xml"/> -</databaseChangeLog> ----- - -TIP: Keep in mind that the header-information can change, visit therefore the liquibase-website: http://www.liquibase.org Specific: the XML-format definition: http://www.liquibase.org/documentation/xml_format.html - -So, that's where all our changes are located - but what about the changes _itself_? -As you can think of, they're stored in files located in the folders `struct` for DDL-stuff like _create_, _alter_ etc. -and `data` for DML-stuff like _insert_, _update_ etc. - -If you want to know what to do add in these files take a look at the official liquibase documentation for further information how to fill these XML files: http://www.liquibase.org/documentation/index.html - -IMPORTANT: Always remember that you might have to define some rollback-entries. + -This is e.g. not needed for create-entries but for others like insert. - -So, whats about that `liquibase.properties` file? The file is needed to specify some data here, e.g. the driver-name, classpath (of the driver), jdbc-url, etc. -You want to store these information there because otherwise you'd need to specify them on every call of liquibase. Not cool. - -Now you're ready to run commands like `liquibase update` in the `PROJECTHOME/others/db_changes` folder. - -=== in practice - -.Let's say we want to add a new table `FOOBAR` with some demo-data. We need to: -* create a new file in the struct-folder; e.g. `create_FOOBAR.xml` -* fill the file with changesets that will create a table -* add `include`-tag in the `masterChangelog.xml` for the created file -* create a new file in the data-foler; e.g. `demoData_FOOBAR.xml` -* fill the file with changesets that will insert data into the table and define *rollback-entries* -* add `include`-tag in the `masterChangelog.xml` for the created file -* to apply the changes simply run `liquibase update` - -For example one feature package "add contact management" could contain several files itself: ----- - create_org.xml - create_pers.xml - create_relation.xml ----- -On the other hand, several feature packages cannot be contained in one changelog-file. - - -== How to use it -Normally everything you need is provided by the project-template and the existing files in the git-repository. -Therefore it's easy to use and you can start immediately. - -.Keep in mind: -* run `liquibase update` to apply possible changes after merging something into your repository -* apply modifications on the database always with liquibase; do not write a create-script in SQL. Write some changesets and execute them -* set correct `author`- and `id`-attributes in your changelog-files - - - -== FAQ -[qanda] -What about unicode-columns like `NVARCHAR` or `NCLOB`?:: - Simply define them in your changesets. They are prefered over non-unicode-datatypes -What if i switch between branches and want to switch between different database-states?:: - This is something that needs to be defined. Possible ways: rollback or recreate your database entirely -Is it possible to write an update-changeset where I can use a preparedStatement in the where-clause?:: - This needs to be analyzed and (the result) added here. - - - ---- - -~have~ ~a~ ~nice~ ~day~ ~:-)~ \ No newline at end of file diff --git a/process/blobHandler/blobHandler.aod b/process/blobHandler/blobHandler.aod index b311d8aedd..ea16fe9164 100644 --- a/process/blobHandler/blobHandler.aod +++ b/process/blobHandler/blobHandler.aod @@ -3,7 +3,5 @@ <name>blobHandler</name> <majorModelMode>DISTRIBUTED</majorModelMode> <process>%aditoprj%/process/blobHandler/process.js</process> - <variants> - <element>LIBRARY</element> - </variants> + <alias>_____SYSTEMALIAS</alias> </process> -- GitLab