Skip to content
Snippets Groups Projects
Commit 28ec6136 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

refactor liquibase

parent 8e9c2d34
No related branches found
No related tags found
No related merge requests found
Showing
with 44 additions and 144 deletions
......@@ -1278,8 +1278,8 @@
<columnType v="12" />
<size v="30" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<notNull v="true" />
<isUnique v="true" />
<index v="true" />
<title></title>
<description></description>
......@@ -1479,8 +1479,8 @@
<columnType v="12" />
<size v="50" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<notNull v="true" />
<isUnique v="true" />
<index v="true" />
<title></title>
<description></description>
......@@ -2165,7 +2165,7 @@
<name>LANGUAGE</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<columnType v="1" />
<size v="5" />
<scale v="0" />
<notNull v="false" />
......
......@@ -9,7 +9,7 @@
<column name="FIRSTNAME" value="Heribert"/>
<column name="MIDDLENAME" value="Anton"/>
<column name="LASTNAME" value="Untermeier"/>
<column name="GENDER" value="männlich"/>
<column name="GENDER" value="m"/>
<column name="SALUTATION" value="Herr"/>
</insert>
<rollback>
......
......@@ -2,10 +2,9 @@
<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_pers.xml"/>
<include file="struct/create_org.xml"/>
<include file="struct/create_relation.xml"/>
<include file="struct/create_history.xml"/>
<include file="struct/1022526_orgChange.xml"/>
<include file="struct/create_historylink.xml"/>
<include file="struct/relationChangePERSID.xml"/>
<include file="struct/create_address.xml"/>
<include file="struct/create_comm.xml"/>
<include file="struct/create_contract.xml"/>
......@@ -22,12 +21,6 @@
<include file="struct/create_salesproject_source.xml"/>
<include file="struct/create_offer.xml"/>
<include file="struct/create_offeritem.xml"/>
<include file="struct/contractChanges.xml"/>
<include file="struct/offerChanges.xml"/>
<include file="struct/productChanges.xml"/>
<include file="struct/offerChangesText.xml"/>
<include file="misc/1535533490181_persChanges.xml"/>
<include file="struct/1535612802325_addressChange.xml"/>
<include file="data/example_org/ORG_privat.xml"/>
<include file="data/example_org/ORG_gfk.xml"/>
<include file="data/example_pers/PERS_pfiffig.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">
<changeSet author="j.goderbauer" id="e4b9e747-d734-441b-9bbd-ee3794c50636">
<addColumn tableName="PERS">
<column name="GENDER_e4b9e747" type="CHAR(1)"/>
</addColumn>
<update tableName="PERS">
<column name="GENDER_e4b9e747" value="m" />
<where>GENDER = ?</where>
<whereParams>
<param value="männlich"/>
</whereParams>
</update>
<dropColumn tableName="PERS">
<column name="GENDER" />
</dropColumn>
<renameColumn tableName="PERS" oldColumnName="GENDER_e4b9e747" newColumnName="GENDER" columnDataType="CHAR(1)" />
<rollback>
<addColumn tableName="PERS">
<column name="GENDER_e4b9e747" type="VARCHAR(50)"/>
</addColumn>
<update tableName="PERS">
<column name="GENDER_e4b9e747" value="männlich" />
<where>GENDER = ?</where>
<whereParams>
<param value="m"/>
</whereParams>
</update>
<dropColumn tableName="PERS">
<column name="GENDER" />
</dropColumn>
<renameColumn tableName="PERS" oldColumnName="GENDER_e4b9e747" newColumnName="GENDER" columnDataType="VARCHAR(50)" />
</rollback>
</changeSet>
</databaseChangeLog>
<?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.goderbauer" id="69397d83-4112-4a1d-bc2d-7299da2b297c">
<modifyDataType tableName="ORG" columnName="CUSTOMERCODE" newDataType="NVARCHAR(30)"></modifyDataType>
<addColumn tableName="ORG">
<column name="SALESAREA" type="SMALLINT"></column>
</addColumn>
<rollback>
<modifyDataType tableName="ORG" columnName="CUSTOMERCODE" newDataType="VARCHAR(30)"></modifyDataType>
</rollback>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?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.goderbauer" id="f3d4fe9a-1dff-48c7-8c30-e06c1273bdda">
<addColumn tableName="ADDRESS">
<column name="ADDR_TYPE_e007e4c0" type="SMALLINT"/>
</addColumn>
<dropColumn tableName="ADDRESS">
<column name="ADDR_TYPE" />
</dropColumn>
<renameColumn tableName="ADDRESS" oldColumnName="ADDR_TYPE_e007e4c0" newColumnName="ADDR_TYPE" columnDataType="SMALLINT"/>
<rollback>
<addColumn tableName="ADDRESS">
<column name="ADDR_TYPE_e007e4c0" type="INTEGER"/>
</addColumn>
<dropColumn tableName="ADDRESS">
<column name="ADDR_TYPE" />
</dropColumn>
<renameColumn tableName="ADDRESS" oldColumnName="ADDR_TYPE_e007e4c0" newColumnName="ADDR_TYPE" columnDataType="INTEGER"/>
</rollback>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?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="m.schroeger" id="609a8e0d-d104-4cdb-a803-3ac65bb456b3">
<modifyDataType tableName="OFFER" columnName="LANGUAGE" newDataType="varchar(5)"/>
<modifyDataType tableName="RELATION" columnName="LANGUAGE" newDataType="varchar(5)"/>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -9,7 +9,7 @@
<column name="DATE_NEW" type="TIMESTAMP">
<constraints nullable="false"/>
</column>
<column name="ADDR_TYPE" type="INTEGER"/>
<column name="ADDR_TYPE" type="SMALLINT"/>
<column name="USER_EDIT" type="VARCHAR(50)"/>
<column name="USER_NEW" type="VARCHAR(50)">
<constraints nullable="false"/>
......
......@@ -2,7 +2,9 @@
<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="m.schroeger" id="fdf350de-cff9-4be1-bcbe-61ec9a46c9f0">
<createTable tableName="CONTRACT">
<column name="CONTRACTCODE" type="VARCHAR(30)"/>
<column name="CONTRACTCODE" type="VARCHAR(30)">
<constraints nullable="false" unique="true" uniqueConstraintName="UNIQUE_CONTRACT_CONTRACTCODE"/>
</column>
<column name="CONTRACTDUE" type="TIMESTAMP"/>
<column name="CONTRACTEND" type="TIMESTAMP"/>
<column name="CONTRACTSTART" type="TIMESTAMP"/>
......
......@@ -12,8 +12,10 @@
<column name="OFFER_ID" type="CHAR(36)">
<constraints foreignKeyName="FK_OFFER_OFFER_ID" references="OFFER(OFFERID)"/>
</column>
<column name="HEADER" type="NCLOB"/>
<column name="FOOTER" type="NCLOB"/>
<column name="OFFERDATE" type="TIMESTAMP"/>
<column name="LANGUAGE" type="INTEGER"/>
<column name="LANGUAGE" type="CHAR(5)"/>
<column name="OFFERCODE" type="INTEGER"/>
<column name="VERSNR" type="INTEGER"/>
<column name="STATUS" type="INTEGER"/>
......
......@@ -7,7 +7,7 @@
</column>
<column name="INFO" type="NCLOB"/>
<column name="TYPE" type="SMALLINT"/>
<column name="CUSTOMERCODE" type="VARCHAR(30)"/>
<column name="CUSTOMERCODE" type="NVARCHAR(30)"/>
<column name="ORGID" type="CHAR(36)">
<constraints primaryKey="true" primaryKeyName="PK_ORG_ORGID"/>
</column>
......@@ -19,24 +19,7 @@
<constraints nullable="false"/>
</column>
<column name="DATE_EDIT" type="TIMESTAMP"/>
</createTable>
<createTable tableName="RELATION">
<column name="STATUS" type="SMALLINT"/>
<column name="LANGUAGE" type="CHAR(5)"/>
<column name="ORG_ID" type="CHAR(36)">
<constraints nullable="false" foreignKeyName="FK_RELATION_ORG_ID" references="ORG(ORGID)"/>
</column>
<column name="RELATIONID" type="CHAR(36)">
<constraints primaryKey="true" primaryKeyName="PK_RELATION_RELATIONID"/>
</column>
<column name="USER_NEW" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="USER_EDIT" type="VARCHAR(50)"/>
<column name="DATE_NEW" type="TIMESTAMP">
<constraints nullable="false"/>
</column>
<column name="DATE_EDIT" type="TIMESTAMP"/>
<column name="SALESAREA" type="SMALLINT"></column>
</createTable>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -15,7 +15,7 @@
<column name="LASTNAME" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="GENDER" type="VARCHAR(50)"/>
<column name="GENDER" type="CHAR(1)"/>
<column name="SALUTATION" type="VARCHAR(16)"/>
<column name="TITLE" type="VARCHAR(50)"/>
<column name="TITLESUFFIX" type="VARCHAR(50)"/>
......
......@@ -9,7 +9,9 @@
<column name="GROUPCODEID" type="INTEGER"/>
<column name="MINSTOCK" type="NUMERIC(14,2)"/>
<column name="ORG_ID" type="CHAR(36)"/>
<column name="PRODUCTCODE" type="VARCHAR(50)"/>
<column name="PRODUCTCODE" type="VARCHAR(50)">
<constraints nullable="false" unique="true" uniqueConstraintName="UNIQUE_PRODUCT_PRODUCTCODE"/>
</column>
<column name="PRODUCTNAME" type="VARCHAR(50)"/>
<column name="STATUS" type="INTEGER"/>
<column name="UNIT" type="INTEGER"/>
......
<?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="m.schroeger" id="27bc9279-0794-436c-9b54-dda05c3c310e">
<dropColumn tableName="OFFER" columnName="LANGUAGE"/>
<addColumn tableName="OFFER">
<column name="LANGUAGE" type="varchar(5)"/>
</addColumn>
<changeSet author="j.hoermann" id="1f8bb402-3dd8-4732-8409-0ffc784f84f4">
<createTable tableName="RELATION">
<column name="STATUS" type="SMALLINT"/>
<column name="LANGUAGE" type="CHAR(5)"/>
<column name="ORG_ID" type="CHAR(36)">
<constraints nullable="false" foreignKeyName="FK_RELATION_ORG_ID" references="ORG(ORGID)"/>
</column>
<column name="PERS_ID" type="CHAR(36)" />
<column name="RELATIONID" type="CHAR(36)">
<constraints primaryKey="true" primaryKeyName="PK_RELATION_RELATIONID"/>
</column>
<column name="USER_NEW" type="VARCHAR(50)">
<constraints nullable="false"/>
</column>
<column name="USER_EDIT" type="VARCHAR(50)"/>
<column name="DATE_NEW" type="TIMESTAMP">
<constraints nullable="false"/>
</column>
<column name="DATE_EDIT" type="TIMESTAMP"/>
</createTable>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?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="m.schroeger" id="af4fdc63-1563-424d-b604-6342dc486842">
<addColumn tableName="OFFER">
<column name="HEADER" type="CLOB"/>
</addColumn>
<addColumn tableName="OFFER">
<column name="FOOTER" type="CLOB"/>
</addColumn>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?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="m.schroeger" id="9d7715ea-da67-4579-b591-ab4cd871e320">
<addUniqueConstraint tableName="PRODUCT" columnNames="PRODUCTCODE" constraintName="unique_PRODUCT_PRODUCTCODE"/>
<rollback>
<dropUniqueConstraint tableName="PRODUCT" constraintName="unique_PRODUCT_PRODUCTCODE"/>
</rollback>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?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.goderbauer" id="10429d7f-f1e9-4b26-a4ac-c232efd360c7">
<addColumn tableName="RELATION">
<column name="PERS_ID" type="CHAR(36)" />
</addColumn>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment