mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Add canonicalize for "db.schema" property
DS-2201: Unable to complete installation of DSpace with non-empty variable "db.schema" configuration file "build.properties"
This commit is contained in:
@@ -868,22 +868,22 @@ public class DatabaseManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the canonical name for a table.
|
||||
* Return the canonical name for a database object.
|
||||
*
|
||||
* @param table
|
||||
* The name of the table.
|
||||
* @return The canonical name of the table.
|
||||
* @param db_object
|
||||
* The name of the database object.
|
||||
* @return The canonical name of the database object.
|
||||
*/
|
||||
static String canonicalize(String table)
|
||||
static String canonicalize(String db_object)
|
||||
{
|
||||
// Oracle expects upper-case table names
|
||||
// Oracle expects upper-case table names, schemas, etc.
|
||||
if (isOracle)
|
||||
{
|
||||
return (table == null) ? null : table.toUpperCase();
|
||||
return (db_object == null) ? null : db_object.toUpperCase();
|
||||
}
|
||||
|
||||
// default database postgres wants lower-case table names
|
||||
return (table == null) ? null : table.toLowerCase();
|
||||
return (db_object == null) ? null : db_object.toLowerCase();
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
@@ -1402,7 +1402,7 @@ public class DatabaseManager
|
||||
|
||||
try
|
||||
{
|
||||
String schema = ConfigurationManager.getProperty("db.schema");
|
||||
String schema = canonicalize(ConfigurationManager.getProperty("db.schema"));
|
||||
if(StringUtils.isBlank(schema)){
|
||||
schema = null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user