mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
17006: Added implicit SQL script variables for TRUE and FALSE 17007: Fixed ETHREEOH-2310: Upgrade from 2.1 E Sp7 to 3.1.1 E build 225 - Duplicate alf_node_status entries detected ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.1:r17006-17007 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17089 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -889,6 +889,8 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
||||
File scriptFile,
|
||||
String scriptUrl) throws Exception
|
||||
{
|
||||
final Dialect dialect = Dialect.getDialect(cfg.getProperties());
|
||||
|
||||
StringBuilder executedStatements = executedStatementsThreadLocal.get();
|
||||
if (executedStatements == null)
|
||||
{
|
||||
@@ -917,6 +919,24 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
||||
String fetchVarName = null;
|
||||
String fetchColumnName = null;
|
||||
Map<String, Object> varAssignments = new HashMap<String, Object>(13);
|
||||
// Special variable assignments:
|
||||
if (dialect instanceof PostgreSQLDialect)
|
||||
{
|
||||
// Needs 1/0 for true/false
|
||||
varAssignments.put("true", "true");
|
||||
varAssignments.put("false", "false");
|
||||
varAssignments.put("TRUE", "TRUE");
|
||||
varAssignments.put("FALSE", "FALSE");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Needs true/false as strings
|
||||
varAssignments.put("true", "1");
|
||||
varAssignments.put("false", "0");
|
||||
varAssignments.put("TRUE", "1");
|
||||
varAssignments.put("FALSE", "0");
|
||||
}
|
||||
|
||||
while(true)
|
||||
{
|
||||
String sqlOriginal = reader.readLine();
|
||||
|
Reference in New Issue
Block a user