mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
58756: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3) 58733: Merged DEV to V4.2-BUG-FIX (4.2.1) 58696: MNT-9111 : MS SQL Server 2008 R2 where user's default schema is not 'dbo', schema validator fails on subsequent restarts and application fails startup Fixed SchemaBootstrap to use the required schema from db.schema.name property if set. 58712: MNT-9111 : MS SQL Server 2008 R2 where user's default schema is not 'dbo', schema validator fails on subsequent restarts and application fails startup Corrected the fix from r58696. Added the db.schema.name to repository.properties. Corrected property handling. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62030 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2013 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -70,6 +70,9 @@ public class ExportDb
|
||||
/** Only top-level tables starting with namePrefix will be exported, set to empty string for all objects */
|
||||
private String namePrefix = "alf_";
|
||||
|
||||
/** Default schema name to use */
|
||||
private String dbSchemaName;
|
||||
|
||||
private final static Log log = LogFactory.getLog(ExportDb.class);
|
||||
|
||||
|
||||
@@ -390,6 +393,11 @@ public class ExportDb
|
||||
*/
|
||||
private String getSchemaName(final DatabaseMetaData dbmd) throws SQLException
|
||||
{
|
||||
if (this.dbSchemaName != null)
|
||||
{
|
||||
return this.dbSchemaName;
|
||||
}
|
||||
|
||||
String schemaName = null;
|
||||
final ResultSet schemas = dbmd.getSchemas();
|
||||
while (schemas.next())
|
||||
@@ -512,4 +520,14 @@ public class ExportDb
|
||||
{
|
||||
this.namePrefix = namePrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default schema name
|
||||
*
|
||||
* @param dbSchemaName the default schema name
|
||||
*/
|
||||
public void setDbSchemaName(String dbSchemaName)
|
||||
{
|
||||
this.dbSchemaName = dbSchemaName;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user