Skip to content
Snippets Groups Projects
Commit aa1a1d02 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Objects being owned by hivemind role can't be reassigned to postgres, since it...

Objects being owned by hivemind role can't be reassigned to postgres, since it prevents execution of successfull setup next time (since already existing objects are owned by sysadm)
parent 730e0286
No related branches found
No related tags found
2 merge requests!827Merge develop changes to master,!641Application setup scheme unified with other apps: added install_app|uninstall_app subcommands.
......@@ -61,7 +61,6 @@ POSTGRES_ACCESS_ADMIN=${POSTGRES_URL:-"postgresql://$POSTGRES_USER@$POSTGRES_HOS
uninstall_app() {
psql "$POSTGRES_ACCESS_ADMIN" -v "ON_ERROR_STOP=ON" -c "do \$\$ BEGIN if hive.app_context_exists('hivemind_app') THEN perform hive.app_remove_context('hivemind_app'); end if; END \$\$"
psql "$POSTGRES_ACCESS_ADMIN" -v "ON_ERROR_STOP=ON" -c "DROP SCHEMA IF EXISTS hivemind_app CASCADE;"
psql "$POSTGRES_ACCESS_ADMIN" -v "ON_ERROR_STOP=ON" -c "REASSIGN OWNED BY hivemind TO postgres; "
psql "$POSTGRES_ACCESS_ADMIN" -v "ON_ERROR_STOP=ON" -c "DROP OWNED BY hivemind"
psql "$POSTGRES_ACCESS_ADMIN" -v "ON_ERROR_STOP=ON" -c "DROP ROLE hivemind"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment