-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DAT-19145 Basic template to setup Informix (#933)
* DAT-19145 Basic template to setup Informix --------- Co-authored-by: Tamelianovych <amelianovychtaras@gmail.com> Co-authored-by: PavloTytarchuk <55182440+PavloTytarchuk@users.noreply.github.com> Co-authored-by: Taras Amelianovych <97164517+Tamelianovych@users.noreply.github.com>
- Loading branch information
1 parent
e53604f
commit f06355f
Showing
56 changed files
with
723 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/resources/liquibase/harness/change/changelogs/informix/addDefaultValueComputed.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-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-latest.xsd"> | ||
<!--https://docs.liquibase.com/change-types/add-default-value.html--> | ||
<changeSet author="oleh" id="1"> | ||
<addDefaultValue tableName="posts" | ||
columnName="inserted_date" | ||
columnDataType="date" | ||
defaultValueComputed="DATETIME YEAR TO FRACTION(5) DEFAULT CURRENT YEAR TO FRACTION(5)"/> | ||
</changeSet> | ||
</databaseChangeLog> |
16 changes: 16 additions & 0 deletions
16
src/main/resources/liquibase/harness/change/changelogs/informix/addDefaultValueDate.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-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-latest.xsd"> | ||
<changeSet id="1" author="as"> | ||
<addColumn tableName="authors"> | ||
<column name="dateTimeColumn" type="datetime"/> | ||
</addColumn> | ||
<addDefaultValue tableName="authors" | ||
columnName="dateTimeColumn" | ||
columnDataType="datetime" | ||
defaultValueDate="2008-02-12T12:34:03"/> | ||
</changeSet> | ||
</databaseChangeLog> |
16 changes: 16 additions & 0 deletions
16
src/main/resources/liquibase/harness/change/changelogs/informix/addDefaultValueNumeric.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-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-latest.xsd"> | ||
<changeSet id="1" author="as"> | ||
<addColumn tableName="authors"> | ||
<column name="numericColumn" type="INTEGER"/> | ||
</addColumn> | ||
<addDefaultValue tableName="authors" | ||
columnName="numericColumn" | ||
columnDataType="INTEGER" | ||
defaultValueNumeric="100000000"/> | ||
</changeSet> | ||
</databaseChangeLog> |
26 changes: 26 additions & 0 deletions
26
src/main/resources/liquibase/harness/change/changelogs/informix/alterSequence.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-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-latest.xsd"> | ||
<changeSet id="1" author="as"> | ||
<createSequence | ||
incrementBy="1" | ||
minValue="1" | ||
sequenceName="test_sequence" | ||
startValue="1"/> | ||
<rollback> | ||
<dropSequence sequenceName="test_sequence"/> | ||
</rollback> | ||
</changeSet> | ||
<changeSet author="as" id="2" > | ||
<alterSequence cacheSize="371717" | ||
cycle="true" | ||
incrementBy="10" | ||
maxValue="371717" | ||
minValue="1" | ||
sequenceName="test_sequence"/> | ||
<rollback/> | ||
</changeSet> | ||
</databaseChangeLog> |
24 changes: 24 additions & 0 deletions
24
src/main/resources/liquibase/harness/change/changelogs/informix/createFunction.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:pro="http://www.liquibase.org/xml/ns/pro" | ||
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-latest.xsd"> | ||
<changeSet author="as" id="1"> | ||
<pro:createFunction | ||
encoding="UTF-8" | ||
functionName="test_function">CREATE FUNCTION test_function() | ||
RETURNS BOOLEAN | ||
LANGUAGE SPL | ||
BEGIN | ||
LET trace_message = 'Test function executed'; | ||
TRACE trace_message; | ||
RETURN TRUE; -- Use TRUE or appropriate value as needed. | ||
END; | ||
</pro:createFunction> | ||
<rollback> | ||
<pro:dropFunction functionName="test_function"/> | ||
</rollback> | ||
</changeSet> | ||
</databaseChangeLog> |
23 changes: 23 additions & 0 deletions
23
src/main/resources/liquibase/harness/change/changelogs/informix/createPackage.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:pro="http://www.liquibase.org/xml/ns/pro" | ||
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-latest.xsd"> | ||
|
||
<changeSet author="as" id="1"> | ||
<pro:createPackage encoding="UTF-8" | ||
packageName="Test package">CREATE FUNCTION test_function() | ||
RETURNS BOOLEAN | ||
LANGUAGE SPL | ||
BEGIN | ||
LET trace_message = 'Test function executed'; | ||
TRACE trace_message; | ||
RETURN TRUE; -- Use TRUE or appropriate value as needed. | ||
END;</pro:createPackage> | ||
<rollback> | ||
<pro:dropFunction functionName="test_function"/> | ||
</rollback> | ||
</changeSet> | ||
</databaseChangeLog> |
23 changes: 23 additions & 0 deletions
23
src/main/resources/liquibase/harness/change/changelogs/informix/createPackageBody.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:pro="http://www.liquibase.org/xml/ns/pro" | ||
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-latest.xsd"> | ||
|
||
<changeSet author="as" id="1"> | ||
<pro:createPackageBody encoding="UTF-8" | ||
packageBodyName="Test package">CREATE FUNCTION test_function() | ||
RETURNS BOOLEAN | ||
LANGUAGE SPL | ||
BEGIN | ||
LET trace_message = 'Test function executed'; | ||
TRACE trace_message; | ||
RETURN TRUE; -- Use TRUE or appropriate value as needed. | ||
END;</pro:createPackageBody> | ||
<rollback> | ||
<pro:dropFunction functionName="test_function"/> | ||
</rollback> | ||
</changeSet> | ||
</databaseChangeLog> |
3 changes: 3 additions & 0 deletions
3
src/main/resources/liquibase/harness/change/changelogs/informix/createProcedure.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CREATE PROCEDURE test_procedure ( per_cent INT) | ||
UPDATE stock SET unit_price = unit_price + (unit_price * (per_cent/100) ); | ||
END PROCEDURE |
20 changes: 20 additions & 0 deletions
20
src/main/resources/liquibase/harness/change/changelogs/informix/createProcedure.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-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-latest.xsd"> | ||
<!--https://docs.liquibase.com/change-types/create-procedure.html--> | ||
<changeSet author="as" id="1"> | ||
<comment>test procedure</comment> | ||
<createProcedure | ||
encoding="UTF-8" | ||
procedureName="test_procedure">CREATE PROCEDURE test_procedure ( per_cent INT) | ||
UPDATE stock SET unit_price = unit_price + (unit_price * (per_cent/100) ); | ||
END PROCEDURE | ||
</createProcedure> | ||
<rollback> | ||
<dropProcedure procedureName="test_procedure"/> | ||
</rollback> | ||
</changeSet> | ||
</databaseChangeLog> |
20 changes: 20 additions & 0 deletions
20
src/main/resources/liquibase/harness/change/changelogs/informix/createProcedureFromFile.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-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-latest.xsd"> | ||
<!--https://docs.liquibase.com/change-types/create-procedure.html--> | ||
<changeSet author="as" id="1"> | ||
<comment>test procedure</comment> | ||
<createProcedure | ||
encoding="UTF-8" | ||
path="createProcedure.txt" | ||
relativeToChangelogFile="true" | ||
procedureName="test_procedure"> | ||
</createProcedure> | ||
<rollback> | ||
<dropProcedure procedureName="test_procedure"/> | ||
</rollback> | ||
</changeSet> | ||
</databaseChangeLog> |
19 changes: 19 additions & 0 deletions
19
src/main/resources/liquibase/harness/change/changelogs/informix/createSequence.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-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-latest.xsd"> | ||
|
||
<changeSet author="oleh" id="1"> | ||
<createSequence | ||
sequenceName="test_sequence" | ||
incrementBy="1" | ||
startValue="1" | ||
minValue="1" | ||
/> | ||
<rollback> | ||
<dropSequence sequenceName="test_sequence"/> | ||
</rollback> | ||
</changeSet> | ||
</databaseChangeLog> |
40 changes: 40 additions & 0 deletions
40
src/main/resources/liquibase/harness/change/changelogs/informix/createTrigger.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:pro="http://www.liquibase.org/xml/ns/pro" | ||
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-latest.xsd"> | ||
<changeSet author="as" id="1"> | ||
<comment>test procedure</comment> | ||
<createProcedure | ||
encoding="UTF-8" | ||
procedureName="test_function">CREATE FUNCTION test_function() | ||
RETURNS BOOLEAN | ||
LANGUAGE SPL | ||
BEGIN | ||
LET trace_message = 'Test function executed'; | ||
TRACE trace_message; | ||
RETURN TRUE; | ||
END; | ||
</createProcedure> | ||
<rollback> | ||
<sql>DROP FUNCTION test_function()</sql> | ||
</rollback> | ||
</changeSet> | ||
<changeSet author="as" id="2"> | ||
<pro:createTrigger disabled="false" | ||
encoding="UTF-8" | ||
scope="test" | ||
tableName="posts" | ||
triggerName="test_trigger">CREATE TRIGGER test_trigger | ||
BEFORE INSERT ON your_table_name | ||
FOR EACH ROW | ||
EXECUTE FUNCTION test_function(); | ||
</pro:createTrigger> | ||
<rollback> | ||
<pro:dropTrigger triggerName="test_trigger" | ||
tableName="posts"/> | ||
</rollback> | ||
</changeSet> | ||
</databaseChangeLog> |
16 changes: 16 additions & 0 deletions
16
src/main/resources/liquibase/harness/change/changelogs/informix/dropDefaultValue.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-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-latest.xsd"> | ||
<!--https://docs.liquibase.com/change-types/add-default-value.html--> | ||
<changeSet author="oleh" id="1"> | ||
<addDefaultValue tableName="posts" | ||
columnName="title" | ||
columnDataType="varchar(255)" | ||
defaultValue="title_test"/> | ||
<dropDefaultValue tableName="posts" columnName="title" columnDataType="varchar(255)"/> | ||
<rollback/> | ||
</changeSet> | ||
</databaseChangeLog> |
19 changes: 19 additions & 0 deletions
19
src/main/resources/liquibase/harness/change/changelogs/informix/dropProcedure.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-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-latest.xsd"> | ||
<!--https://docs.liquibase.com/change-types/drop-procedure.html--> | ||
<changeSet author="as" id="1"> | ||
<comment>test procedure</comment> | ||
<createProcedure | ||
encoding="UTF-8" | ||
path="createProcedure.txt" | ||
relativeToChangelogFile="true" | ||
procedureName="test_procedure"> | ||
</createProcedure> | ||
<dropProcedure procedureName="test_procedure"/> | ||
<rollback/> | ||
</changeSet> | ||
</databaseChangeLog> |
18 changes: 18 additions & 0 deletions
18
src/main/resources/liquibase/harness/change/changelogs/informix/dropSequence.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-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-latest.xsd"> | ||
|
||
<changeSet author="oleh" id="1"> | ||
<createSequence | ||
sequenceName="test_sequence" | ||
incrementBy="1" | ||
startValue="1" | ||
minValue="1" | ||
/> | ||
<dropSequence sequenceName="test_sequence"/> | ||
<rollback/> | ||
</changeSet> | ||
</databaseChangeLog> |
Oops, something went wrong.