Extra debug for CLOUD-1904 (DEVOPS-3336) Patch "patch.db-V4.1-increase-column-size-activiti" is not executing during SQL phase upgrade

- All schema change SQL statements will be written to debug for cloud
 - DEBUG logging if the ACT_RU_TASK table is not found


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@53158 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2013-07-24 20:11:07 +00:00
parent 21084922ef
commit 255c12f2ba

View File

@@ -617,21 +617,21 @@ public class SchemaBootstrap extends AbstractLifecycleBean
/**
* Check whether Activiti tables already created in db.
*
* @param cfg The Hibernate config
* @param connection a valid database connection
* @return <code>true</code> if Activiti tables already created in schema, otherwise <code>false</code>
*/
private boolean checkActivitiTablesExists(Configuration cfg, Connection connection)
private boolean checkActivitiTablesExist(Connection connection)
{
Statement stmt = null;
try
{
stmt = connection.createStatement();
stmt.executeQuery("select count(id_) from ACT_RU_TASK");
stmt.executeQuery("select min(id_) from ACT_RU_TASK");
return true;
}
catch (SQLException e)
{
logger.debug("Did not find ACT_RU_TASK table.");
return false;
}
finally
@@ -829,7 +829,7 @@ public class SchemaBootstrap extends AbstractLifecycleBean
String dialectStr = dialect.getClass().getSimpleName();
// Initialise Activiti DB, using an unclosable connection
if(!checkActivitiTablesExists(cfg, connection))
if(!checkActivitiTablesExist(connection))
{
// Activiti DB updates are performed as patches in alfresco, only give
// control to activiti when creating new one.