Skip to content

Commit

Permalink
Updating scripts and examples for latest Oracle database changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshaw committed Oct 19, 2023
1 parent b2ac74b commit a26bcf3
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion _examples/a_bit_of_everything/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TEST=$(basename $SRC)
declare -A DSNS
DSNS+=(
[mysql]=my://$TEST:$TEST@localhost/$TEST
[oracle]=or://$TEST:$TEST@localhost/db1
[oracle]=or://$TEST:$TEST@localhost/free
[postgres]=pg://$TEST:$TEST@localhost/$TEST
[sqlite3]=sq:$TEST.db
[sqlserver]=ms://$TEST:$TEST@localhost/$TEST
Expand Down
2 changes: 1 addition & 1 deletion _examples/booktest/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TEST=$(basename $SRC)
declare -A DSNS
DSNS+=(
[mysql]=my://$TEST:$TEST@localhost/$TEST
[oracle]=or://$TEST:$TEST@localhost/db1
[oracle]=or://$TEST:$TEST@localhost/free
[postgres]=pg://$TEST:$TEST@localhost/$TEST
[sqlite3]=sq:$TEST.db
[sqlserver]=ms://$TEST:$TEST@localhost/$TEST
Expand Down
4 changes: 2 additions & 2 deletions _examples/createdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DATAFILE=
declare -A INIT
INIT+=(
[mysql]=my://localhost/
[oracle]=or://localhost:1521/db1
[oracle]=or://localhost/free
[postgres]=pg://localhost/
[sqlserver]=ms://localhost/
)
Expand Down Expand Up @@ -46,7 +46,7 @@ for TYPE in $DATABASES; do
fi
DB=${INIT[$TYPE]}
if [[ -z "$DATAFILE" && "$TYPE" = "oracle" ]]; then
DATAFILE=$(printf '/opt/oracle/oradata/ORASID/%s.dbf' "$NAME")
DATAFILE=$(printf '/opt/oracle/oradata/FREE/%s.dbf' "$NAME")
elif [[ "$TYPE" != "oracle" ]]; then
DATAFILE=""
fi
Expand Down
2 changes: 1 addition & 1 deletion _examples/django/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TEST=$(basename $SRC)
declare -A DSNS
DSNS+=(
[mysql]=my://$TEST:$TEST@localhost/$TEST
[oracle]=or://$TEST:$TEST@localhost/db1
[oracle]=or://$TEST:$TEST@localhost/free
[postgres]=pg://$TEST:$TEST@localhost/$TEST
[sqlite3]=sq:$TEST.db
[sqlserver]=ms://$TEST:$TEST@localhost/$TEST
Expand Down
2 changes: 1 addition & 1 deletion _examples/django/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ case $TYPE in
[engine]=django.db.backends.oracle
[user]=django
[pass]=django
[name]=127.0.0.1:1521/db1
[name]=127.0.0.1:1521/free
)
;;
postgres)
Expand Down
2 changes: 2 additions & 0 deletions _examples/init/oracle.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ DROP USER :NAME CASCADE;

CREATE TABLESPACE :NAME NOLOGGING DATAFILE :'DATAFILE' SIZE 100M AUTOEXTEND ON;

ALTER SESSION SET "_oracle_script"=true;

CREATE
USER :NAME
IDENTIFIED BY :PASS
Expand Down
2 changes: 1 addition & 1 deletion _examples/northwind/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TEST=$(basename $SRC)
declare -A DSNS
DSNS+=(
[mysql]=my://$TEST:$TEST@localhost/$TEST
[oracle]=or://$TEST:$TEST@localhost/db1
[oracle]=or://$TEST:$TEST@localhost/free
[postgres]=pg://$TEST:$TEST@localhost/$TEST
[sqlite3]=sq:$TEST.db
[sqlserver]=ms://$TEST:$TEST@localhost/$TEST
Expand Down
2 changes: 1 addition & 1 deletion gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PGDB=pg://
MYDB=my://localhost/mysql
MSDB=ms://
SQDB=sq:xo.db
ORDB=or://localhost/orasid
ORDB=or://localhost/free

DEST=$1
if [ -z "$DEST" ]; then
Expand Down

0 comments on commit a26bcf3

Please sign in to comment.