Skip to content

Commit b1d99f3

Browse files
committed
Separated the install for trigger.
1 parent db8ef50 commit b1d99f3

File tree

5 files changed

+75
-5
lines changed

5 files changed

+75
-5
lines changed

.travis/install.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,18 @@ if [[ "${TRAVIS_JOB_NUMBER}" =~ \.2$ ]]; then
2525
set verify off
2626
2727
@uninstall_all.sql $UT3_OWNER
28+
whenever sqlerror exit failure rollback
2829
declare
2930
v_leftover_objects_count integer;
3031
begin
3132
select sum(cnt)
3233
into v_leftover_objects_count
33-
from (select count(1) cnt from dba_objects where owner = '$UT3_OWNER'
34-
union all
35-
select count(1) cnt from dba_synonyms where table_owner = '$UT3_OWNER'
34+
from (
35+
select count(1) cnt from dba_objects where owner = '$UT3_OWNER'
36+
where object_name not like 'PLSQL_PROFILER%' and object_name not like 'DBMSPCC_%'
37+
union all
38+
select count(1) cnt from dba_synonyms where table_owner = '$UT3_OWNER'
39+
where table_name not like 'PLSQL_PROFILER%' and table_name not like 'DBMSPCC_%'
3640
);
3741
if v_leftover_objects_count > 0 then
3842
raise_application_error(-20000, 'Not all objects were successfully uninstalled - leftover objects count='||v_leftover_objects_count);

source/install.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,6 @@ prompt Installing DBMSPLSQL Tables objects into &&ut3_owner schema
335335
@@install_component.sql 'api/match.syn'
336336
@@install_component.sql 'api/contain.syn'
337337

338-
@@install_component.sql 'core/annotations/ut_trigger_annotation_parsing.trg'
339-
340338
set linesize 200
341339
set define on
342340
column text format a100

source/install_ddl_trigger.sql

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
utPLSQL - Version 3
3+
Copyright 2016 - 2018 utPLSQL Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License"):
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
*/
17+
18+
@@define_ut3_owner_param.sql
19+
20+
@@install_component.sql 'core/annotations/ut_trigger_annotation_parsing.trg'
21+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
utPLSQL - Version 3
3+
Copyright 2016 - 2018 utPLSQL Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License"):
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
*/
17+
set echo off
18+
set verify off
19+
column 1 new_value 1 noprint
20+
column 2 new_value 2 noprint
21+
column 3 new_value 3 noprint
22+
select null as "1", null as "2" , null as "3" from dual where 1=0;
23+
column sep new_value sep noprint
24+
select '--------------------------------------------------------------' as sep from dual;
25+
26+
spool params.sql.tmp
27+
28+
column ut3_owner new_value ut3_owner noprint
29+
column ut3_password new_value ut3_password noprint
30+
column ut3_tablespace new_value ut3_tablespace noprint
31+
32+
select coalesce('&&1','UT3') ut3_owner,
33+
coalesce('&&2','XNtxj8eEgA6X6b6f') ut3_password,
34+
coalesce('&&3','users') ut3_tablespace from dual;
35+
36+
37+
@@create_utplsql_owner.sql &&ut3_owner &&ut3_password &&ut3_tablespace
38+
@@install.sql &&ut3_owner
39+
@@create_synonyms_and_grants_for_public.sql &&ut3_owner
40+
41+
@@install_ddl_trigger.sql
42+
43+
exit

source/uninstall_objects.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ drop package ut_suite_manager;
6868

6969
drop package ut_suite_builder;
7070

71+
drop package ut_suite_cache_manager;
72+
7173
drop table ut_suite_cache;
7274

7375
drop sequence ut_suite_cache_seq;
@@ -298,6 +300,8 @@ drop type ut_key_value_pairs force;
298300

299301
drop type ut_key_value_pair force;
300302

303+
drop type ut_key_anyvalues force;
304+
301305
drop type ut_object_names force;
302306

303307
drop type ut_object_name force;

0 commit comments

Comments
 (0)