Skip to content

Commit 9b9ac91

Browse files
authored
Merge pull request #35 from jasonlyle88/develop
Version 1.09.00
2 parents 3d4f797 + d130b0c commit 9b9ac91

File tree

8 files changed

+137
-1
lines changed

8 files changed

+137
-1
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<databaseChangeLog
3+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:ora="http://www.oracle.com/xml/ns/dbchangelog-ext"
6+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.17.xsd"
7+
>
8+
<changeSet
9+
id="default-sqlcl-executor-test"
10+
author="jyle"
11+
runOnChange="true"
12+
runAlways="true"
13+
>
14+
<sql>prompt "Hello world!"</sql>
15+
</changeSet>
16+
</databaseChangeLog>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<databaseChangeLog
3+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:ora="http://www.oracle.com/xml/ns/dbchangelog-ext"
6+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.17.xsd"
7+
>
8+
<changeSet
9+
id="setup-environment"
10+
author="jlyle"
11+
runOnChange="true"
12+
runAlways="true"
13+
>
14+
<sql>set define off</sql>
15+
</changeSet>
16+
<changeSet
17+
id="test-define"
18+
author="jlyle"
19+
runOnChange="true"
20+
runAlways="true"
21+
>
22+
<sql><![CDATA[select '&foo' from sys.dual;]]></sql>
23+
</changeSet>
24+
</databaseChangeLog>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<databaseChangeLog
3+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:ora="http://www.oracle.com/xml/ns/dbchangelog-ext"
6+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.17.xsd"
7+
>
8+
<changeSet
9+
id="setup-environment"
10+
author="jlyle"
11+
runOnChange="true"
12+
runAlways="true"
13+
>
14+
<sql>set sqlblanklines on</sql>
15+
</changeSet>
16+
<changeSet
17+
id="test-sqlblanklines"
18+
author="jlyle"
19+
runOnChange="true"
20+
runAlways="true"
21+
>
22+
<sql>select
23+
24+
'foo'
25+
26+
from
27+
28+
sys.dual;</sql>
29+
</changeSet>
30+
</databaseChangeLog>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<databaseChangeLog
3+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:ora="http://www.oracle.com/xml/ns/dbchangelog-ext"
6+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.17.xsd"
7+
>
8+
<include file="warnings-should-not-exit/ct.sql" relativeToChangelogFile="true" />
9+
<include file="warnings-should-not-exit/ot.sql" relativeToChangelogFile="true" />
10+
<include file="warnings-should-not-exit/reset.sql" relativeToChangelogFile="true" />
11+
</databaseChangeLog>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--liquibase formatted sql
2+
3+
--changeset jlyle:collection_type_create stripComments:false endDelimiter:/ runOnChange:true
4+
create or replace type jml_test_ct
5+
force
6+
is table
7+
of jml_test_ot;
8+
/
9+
--rollback drop type jml_test_ct force;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--liquibase formatted sql
2+
3+
--changeset jlyle:object_type_create stripComments:false endDelimiter:/ runOnChange:true
4+
create or replace type jml_test_ot
5+
force
6+
authid definer
7+
is object(
8+
seq number,
9+
key_string varchar2(32767),
10+
value_string varchar2(32767)
11+
);
12+
/
13+
--rollback drop type jml_test_ot force;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--liquibase formatted sql
2+
3+
--changeset jlyle:object_type_drop stripComments:false endDelimiter:/ runOnChange:true
4+
begin
5+
6+
begin
7+
execute immediate 'drop type jml_test_ct';
8+
exception when others then
9+
null;
10+
end;
11+
12+
begin
13+
execute immediate 'drop type jml_test_ot';
14+
exception when others then
15+
null;
16+
end;
17+
18+
end;
19+
/
20+
--rollback not required

source/sqlclUnitTest.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,19 @@ function main() {
827827
printf -- 'Unit tests finished running.\n' | tee -a "${logMainFile}"
828828
fi
829829

830+
##
831+
## Cleanup liquibase error log files
832+
##
833+
834+
printf -- '\n' | tee -a "${logMainFile}"
835+
printf -- '%s\n' "${h1}" | tee -a "${logMainFile}"
836+
printf -- '%s %s\n' "${hs}" 'Cleanup liquibase error log files' | tee -a "${logMainFile}"
837+
printf -- '%s\n' "${h1}" | tee -a "${logMainFile}"
838+
839+
find "${liquibaseTestsDirectory}" -iname 'sqlcl-lb-error*.log' -delete
840+
841+
printf -- 'Completed.\n' | tee -a "${logMainFile}"
842+
830843
##
831844
## Cleanup testing objects in database
832845
##
@@ -836,7 +849,7 @@ function main() {
836849
printf -- '%s %s\n' "${hs}" 'Cleanup unit test database objects' | tee -a "${logMainFile}"
837850
printf -- '%s\n' "${h1}" | tee -a "${logMainFile}"
838851

839-
"${sqlclBinary}" "${sqlParamsDirectConnect[@]}" "${sqlParamsWithPassword[@]}" 1>>"${logMainFile}" 2>&1 <<- EOF
852+
SQLPATH="" "${sqlclBinary}" "${sqlParamsDirectConnect[@]}" "${sqlParamsWithPassword[@]}" 1>>"${logMainFile}" 2>&1 <<- EOF
840853
declare
841854
c_unique_identifier constant varchar2(255 char) := upper('${scriptUniqueIdentifier}');
842855
begin

0 commit comments

Comments
 (0)