Add CASCADE to DROP SCHEMA... in tear_down #138

This commit is contained in:
Rafa de la Torre 2015-09-07 16:27:49 +02:00
parent d67f097703
commit 6e4a5b5635

View File

@ -123,7 +123,7 @@ function create_role_and_schema() {
function drop_role_and_schema() { function drop_role_and_schema() {
local ROLE=$1 local ROLE=$1
sql "DROP SCHEMA \"${ROLE}\";" sql "DROP SCHEMA \"${ROLE}\" CASCADE;"
sql "REVOKE CONNECT ON DATABASE \"${DATABASE}\" FROM \"${ROLE}\";" sql "REVOKE CONNECT ON DATABASE \"${DATABASE}\" FROM \"${ROLE}\";"
sql "DROP ROLE \"${ROLE}\";" sql "DROP ROLE \"${ROLE}\";"
} }
@ -210,8 +210,8 @@ function tear_down() {
sql "DROP SCHEMA cartodb CASCADE" sql "DROP SCHEMA cartodb CASCADE"
log_info "########################### TEAR DOWN ###########################" log_info "########################### TEAR DOWN ###########################"
sql 'DROP SCHEMA cdb_testmember_1;' sql 'DROP SCHEMA cdb_testmember_1 CASCADE;'
sql 'DROP SCHEMA cdb_testmember_2;' sql 'DROP SCHEMA cdb_testmember_2 CASCADE;'
sql "REVOKE CONNECT ON DATABASE \"${DATABASE}\" FROM cdb_testmember_1;" sql "REVOKE CONNECT ON DATABASE \"${DATABASE}\" FROM cdb_testmember_1;"
sql "REVOKE CONNECT ON DATABASE \"${DATABASE}\" FROM cdb_testmember_2;" sql "REVOKE CONNECT ON DATABASE \"${DATABASE}\" FROM cdb_testmember_2;"