stop trying to clear the public schema on postgres

because you don't have permission to do that
This commit is contained in:
Gavin King 2021-12-10 19:39:45 +01:00
parent 611b6c0179
commit 675d176b57
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ public class PostgreSQLDatabaseCleaner implements DatabaseCleaner {
statement -> { statement -> {
try { try {
return statement.executeQuery( return statement.executeQuery(
"SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME <> 'information_schema' AND SCHEMA_NAME <> 'sys' AND SCHEMA_NAME NOT LIKE 'pg_%'" ); "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME <> 'information_schema' AND SCHEMA_NAME <> 'sys' AND SCHEMA_NAME <> 'public' AND SCHEMA_NAME NOT LIKE 'pg_%'" );
} }
catch (SQLException sqlException) { catch (SQLException sqlException) {
throw new RuntimeException( sqlException ); throw new RuntimeException( sqlException );