Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Separated the install for trigger.
  • Loading branch information
jgebal committed Apr 25, 2019
commit b1d99f35c79306e294fea98878018d2ad35ba1ba
10 changes: 7 additions & 3 deletions .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@ if [[ "${TRAVIS_JOB_NUMBER}" =~ \.2$ ]]; then
set verify off

@uninstall_all.sql $UT3_OWNER
whenever sqlerror exit failure rollback
declare
v_leftover_objects_count integer;
begin
select sum(cnt)
into v_leftover_objects_count
from (select count(1) cnt from dba_objects where owner = '$UT3_OWNER'
union all
select count(1) cnt from dba_synonyms where table_owner = '$UT3_OWNER'
from (
select count(1) cnt from dba_objects where owner = '$UT3_OWNER'
where object_name not like 'PLSQL_PROFILER%' and object_name not like 'DBMSPCC_%'
union all
select count(1) cnt from dba_synonyms where table_owner = '$UT3_OWNER'
where table_name not like 'PLSQL_PROFILER%' and table_name not like 'DBMSPCC_%'
);
if v_leftover_objects_count > 0 then
raise_application_error(-20000, 'Not all objects were successfully uninstalled - leftover objects count='||v_leftover_objects_count);
Expand Down
2 changes: 0 additions & 2 deletions source/install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,6 @@ prompt Installing DBMSPLSQL Tables objects into &&ut3_owner schema
@@install_component.sql 'api/match.syn'
@@install_component.sql 'api/contain.syn'

@@install_component.sql 'core/annotations/ut_trigger_annotation_parsing.trg'

set linesize 200
set define on
column text format a100
Expand Down
21 changes: 21 additions & 0 deletions source/install_ddl_trigger.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
utPLSQL - Version 3
Copyright 2016 - 2018 utPLSQL Project

Licensed under the Apache License, Version 2.0 (the "License"):
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

@@define_ut3_owner_param.sql

@@install_component.sql 'core/annotations/ut_trigger_annotation_parsing.trg'

43 changes: 43 additions & 0 deletions source/install_headless_with_trigger.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
utPLSQL - Version 3
Copyright 2016 - 2018 utPLSQL Project

Licensed under the Apache License, Version 2.0 (the "License"):
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
set echo off
set verify off
column 1 new_value 1 noprint
column 2 new_value 2 noprint
column 3 new_value 3 noprint
select null as "1", null as "2" , null as "3" from dual where 1=0;
column sep new_value sep noprint
select '--------------------------------------------------------------' as sep from dual;

spool params.sql.tmp

column ut3_owner new_value ut3_owner noprint
column ut3_password new_value ut3_password noprint
column ut3_tablespace new_value ut3_tablespace noprint

select coalesce('&&1','UT3') ut3_owner,
coalesce('&&2','XNtxj8eEgA6X6b6f') ut3_password,
coalesce('&&3','users') ut3_tablespace from dual;


@@create_utplsql_owner.sql &&ut3_owner &&ut3_password &&ut3_tablespace
@@install.sql &&ut3_owner
@@create_synonyms_and_grants_for_public.sql &&ut3_owner

@@install_ddl_trigger.sql

exit
4 changes: 4 additions & 0 deletions source/uninstall_objects.sql
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ drop package ut_suite_manager;

drop package ut_suite_builder;

drop package ut_suite_cache_manager;

drop table ut_suite_cache;

drop sequence ut_suite_cache_seq;
Expand Down Expand Up @@ -298,6 +300,8 @@ drop type ut_key_value_pairs force;

drop type ut_key_value_pair force;

drop type ut_key_anyvalues force;

drop type ut_object_names force;

drop type ut_object_name force;
Expand Down