diff --git a/.env.example b/.env.example index fdb8a5313e..54df38589a 100644 --- a/.env.example +++ b/.env.example @@ -89,6 +89,9 @@ PGSQL_SSL_CERT=null PGSQL_SSL_KEY=null PGSQL_SSL_CRL_FILE=null +# more PostgreSQL settings +PGSQL_SCHEMA=public + # If you're looking for performance improvements, you could install memcached or redis CACHE_DRIVER=file SESSION_DRIVER=file diff --git a/config/database.php b/config/database.php index e4a1338577..3972ed7281 100644 --- a/config/database.php +++ b/config/database.php @@ -109,7 +109,7 @@ return [ 'password' => env('DB_PASSWORD', $password), 'charset' => 'utf8', 'prefix' => '', - 'schema' => 'public', + 'schema' => envNonEmpty('PGSQL_SCHEMA', 'public'), 'sslmode' => envNonEmpty('PGSQL_SSL_MODE', 'prefer'), 'sslcert' => envNonEmpty('PGSQL_SSL_CERT'), 'sslkey' => envNonEmpty('PGSQL_SSL_KEY'),