Skip to content

Commit

Permalink
Update the dbwipe commands for parity with dbinit (#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
smklein authored Jun 30, 2022
1 parent 144aa5a commit 0aa4088
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions common/src/sql/dbwipe.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,15 @@
* NOTE: the database and user names MUST be kept in sync with the
* initialization code and dbwipe.sql.
*/

/*
* This is silly, but we throw an error if the user was already deleted.
* Create the user so we can always delete it.
*/
CREATE DATABASE IF NOT EXISTS omicron;
CREATE USER IF NOT EXISTS omicron;

ALTER DEFAULT PRIVILEGES FOR ROLE root REVOKE ALL ON TABLES FROM omicron;

DROP DATABASE IF EXISTS omicron;
DROP USER IF EXISTS omicron;

0 comments on commit 0aa4088

Please sign in to comment.