mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Added support to bypass PostgreSQL's use of 'TRUE' where other DBs use '1'
- http://wiki.alfresco.com/wiki/Schema_Upgrade_Scripts#Script_Variables git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14866 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1013,6 +1013,16 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
|||||||
sql = sql.replaceAll("\\$\\{" + var + "\\}", val.toString());
|
sql = sql.replaceAll("\\$\\{" + var + "\\}", val.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle the 0/1 values that PostgreSQL doesn't translate to TRUE
|
||||||
|
if (this.dialect != null && this.dialect instanceof PostgreSQLDialect)
|
||||||
|
{
|
||||||
|
sql = sql.replaceAll("\\$\\{TRUE\\}", "TRUE");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sql = sql.replaceAll("\\$\\{TRUE\\}", "1");
|
||||||
|
}
|
||||||
|
|
||||||
Object fetchedVal = executeStatement(connection, sql, fetchColumnName, optional, line, scriptFile);
|
Object fetchedVal = executeStatement(connection, sql, fetchColumnName, optional, line, scriptFile);
|
||||||
if (fetchVarName != null && fetchColumnName != null)
|
if (fetchVarName != null && fetchColumnName != null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user