diff --git a/common/src/sql/dbwipe.sql b/common/src/sql/dbwipe.sql index 40460bacb4..92f7b089dd 100644 --- a/common/src/sql/dbwipe.sql +++ b/common/src/sql/dbwipe.sql @@ -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;