diff --git a/dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05380ChangeContainerPathToAbsolute.java b/dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05380ChangeContainerPathToAbsolute.java index 07501e474d1e..644b489000e7 100644 --- a/dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05380ChangeContainerPathToAbsolute.java +++ b/dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05380ChangeContainerPathToAbsolute.java @@ -21,20 +21,13 @@ */ public class Task05380ChangeContainerPathToAbsolute implements StartupTask { - final static String GET_TEMPLATES_QUERY = "SELECT DISTINCT contentlet.title as host_name, template.inode, template.identifier, template.drawed_body, template.body " + + final static String GET_TEMPLATES_QUERY = "SELECT contentlet.title as host_name, template.inode, template.identifier, template.drawed_body, template.body " + "FROM identifier " + "INNER JOIN template ON identifier.id = template.identifier " + "INNER JOIN contentlet_version_info cvi on identifier.host_inode = cvi.identifier " + "INNER JOIN contentlet ON cvi.working_inode = contentlet.inode " + "WHERE template.drawed_body is not null order by template.inode"; - final static String GET_TEMPLATES_QUERY_ORACLE = "SELECT DISTINCT contentlet.title as host_name, template.inode, template.identifier, to_char(template.drawed_body), to_char(template.body) " + - "FROM identifier " + - "INNER JOIN template ON identifier.id = template.identifier " + - "INNER JOIN contentlet_version_info cvi on identifier.host_inode = cvi.identifier " + - "INNER JOIN contentlet ON cvi.working_inode = contentlet.inode " + - "WHERE to_char(template.drawed_body) is not null order by template.inode"; - final static String UPDATE_TEMPLATES = "update template set drawed_body = ?, body = ? where inode =?"; final static String UPDATE_TEMPLATES_ORACLE = "update template set drawed_body = TO_CLOB(?), body = ? where inode =?"; @@ -113,7 +106,7 @@ private List getRelativePaths(final String drawedBody) { private List> getAllDrawedTemplates() throws DotDataException { return new DotConnect() - .setSQL(DbConnectionFactory.isOracle() ? GET_TEMPLATES_QUERY_ORACLE : GET_TEMPLATES_QUERY) + .setSQL(GET_TEMPLATES_QUERY) .loadObjectResults(); } }