Skip to content
Snippets Groups Projects
Commit aabea873 authored by S.Listl's avatar S.Listl
Browse files

Data_alias liquibase MS SQL problems fixed

parent 806993cd
No related branches found
No related tags found
No related merge requests found
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<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="j.hoermann" id="15176b40-4b5e-48a9-8dfc-4540b01595c8">
<preConditions onFail="CONTINUE">
<not>
<tableExists tableName="TICKET"/>
</not>
</preConditions>
<createTable tableName="TICKET">
<column name="TICKETID" type="CHAR(36)">
<constraints primaryKey="true" primaryKeyName="PK_TICKET_TICKETID"/>
......@@ -12,6 +18,13 @@
<column name="TICKETTYPE" type="VARCHAR(36)"/>
</createTable>
<sql dbms="mssql">
DECLARE @ConstraintName nvarchar(200)
SELECT @ConstraintName = CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE WHERE TABLE_NAME = 'TASK' AND COLUMN_NAME = 'CODE'
IF @ConstraintName IS NOT NULL
EXEC('ALTER TABLE TASK DROP CONSTRAINT ' + @ConstraintName)
</sql>
<dropNotNullConstraint tableName="TASK" columnName="CODE" columnDataType="INTEGER"/>
<dropColumn tableName="TASK" columnName="CODE"/>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -9,13 +9,15 @@
</sql>
</changeSet>
<changeSet author="j.hoermann" id="9a86323f-a299-42a5-937a-f5e37d0db507">
<preConditions onFail="CONTINUE">
<not>
<dbms type="derby" />
</not>
</preConditions>
<changeSet dbms="!derby,!mssql" author="j.hoermann" id="9a86323f-a299-42a5-937a-f5e37d0db507">
<modifyDataType tableName="ACTIVITYLINK" columnName="ACTIVITY_ID" newDataType="CHAR(36)"/>
</changeSet>
<changeSet dbms="mssql" author="s.listl" id="e8961eb9-80af-4a60-98cb-3cd843f2424a">
<dropIndex tableName="ACTIVITYLINK" indexName="IDX_ACTIVITYLINK_ACTIVITY_ID"/>
<modifyDataType tableName="ACTIVITYLINK" columnName="ACTIVITY_ID" newDataType="CHAR(36)"/>
<createIndex indexName="IDX_ACTIVITYLINK_ACTIVITY_ID" tableName="ACTIVITYLINK">
<column name="ACTIVITY_ID" />
</createIndex>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -2,6 +2,11 @@
<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="28627941-6c9b-46e8-922a-b4660b33723c">
<preConditions onFail="CONTINUE">
<columnExists tableName="OBJECTMEMBER" columnName="DECIDER"/>
</preConditions>
<dropNotNullConstraint tableName="OBJECTMEMBER" columnName="DECIDER" columnDataType="TINYINT"/>
<dropDefaultValue tableName="OBJECTMEMBER" columnName="DECIDER"/>
<dropColumn tableName="OBJECTMEMBER" columnName="DECIDER"/>
</changeSet>
</databaseChangeLog>
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