File tree Expand file tree Collapse file tree 5 files changed +67
-6
lines changed
Expand file tree Collapse file tree 5 files changed +67
-6
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ install:
5555 - .travis/setup_account.sh
5656 # Install project sources and tests
5757 - source/install.sh
58+ - source/uninstall.sh
59+ - source/install.sh
5860 - test/install.sh
5961
6062script :
Original file line number Diff line number Diff line change 44
55cd " $( dirname " $( readlink -f " $0 " ) " ) "
66
7- sqlplus -L -S / as sysdba @install .sql utp ut3
7+ sqlplus -L -S / as sysdba @uninstall .sql utp ut3
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ from dual;
3333
3434spool off
3535
36+ spool install .log
37+
3638set termout on
3739@params .sql .tmp
3840
@@ -98,6 +100,7 @@ prompt &&sep
98100
99101set termout off
100102
103+ spool off
101104/*
102105* cleanup temporary sql files
103106*/
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -ev
4+
5+ cd " $( dirname " $( readlink -f " $0 " ) " ) "
6+
7+ sqlplus -L -S / as sysdba @install.sql utp ut3
Original file line number Diff line number Diff line change 1- drop package utassert;
2- drop package utassert2;
3- drop package ut_v2_migration;
4- drop public synonym ut_v2_migration;
1+ prompt Removing utplsql v2- v3 migration utility
2+
3+ set timing off
4+ set feedback off
5+ set verify off
6+ set heading off
7+ set linesize 1000
8+ set pagesize 0
9+ set echo off
10+ set termout off
11+ set serveroutput on size unlimited format truncated
12+
13+ column 1 new_value 1 noprint
14+ column 2 new_value 2 noprint
15+ select null as " 1" , null as " 2" from dual where 1 = 0 ;
16+ column sep new_value sep noprint
17+ select ' --------------------------------------------------------------' as sep from dual;
18+
19+ spool params .sql .tmp
20+
21+ select
22+ case
23+ when ' &&1' is null then q' [ACCEPT utplsql_v2_owner CHAR DEFAULT ' UTP' PROMPT ' Provide schema owning the utPLSQL v2 (UTP)' ]'
24+ else ' define utplsql_v2_owner=&&1'
25+ end
26+ from dual;
27+ select
28+ case
29+ when ' &&2' is null then q' [ACCEPT utplsql_v3_owner CHAR DEFAULT ' UT3' PROMPT ' Provide schema owning the utPLSQL v3 (UT3)' ]'
30+ else ' define utplsql_v3_owner=&&2'
31+ end
32+ from dual;
33+
34+ spool off
35+ set termout on
36+ @params .sql .tmp
37+
38+ spool uninstall .log
39+
40+ drop package &&utplsql_v3_owner..ut_v2_migration;
41+ drop public synonym &&utplsql_v3_owner..ut_v2_migration;
42+ drop package &&utplsql_v3_owner..utassert;
43+ drop package &&utplsql_v3_owner..utassert2;
544create or replace public synonym utassert for &&utplsql_v2_owner..utassert;
645create or replace public synonym utassert2 for &&utplsql_v2_owner..utassert2;
7- drop package ut_v2_migration;
46+
47+ spool off
48+ /*
49+ * cleanup temporary sql files
50+ */
51+ -- try running on windows
52+ $ del * .sql .tmp
53+ -- try running on linux/unix
54+ ! rm * .sql .tmp
55+
56+ exit success
You can’t perform that action at this time.
0 commit comments