From e21a1589317356172629eea037c1803fcca2b648 Mon Sep 17 00:00:00 2001 From: jensp Date: Wed, 10 Dec 2014 18:56:40 +0000 Subject: [PATCH] Various modifications on upgrade script to make them work with Oracle. In some cases there now distict scripts for Oracle and PostgreSQL. git-svn-id: https://svn.libreccm.org/ccm/trunk@3030 8810af33-2d31-482b-a856-94f89814c4df --- .../default/6.6.1-6.6.2/upd_system_tables.sql | 41 +++++++------- .../upgrade/oracle-se-6.6.2-6.6.3.sql | 2 +- .../oracle-se/6.6.2-6.6.3/set_singleton.sql | 20 +++++++ .../ccm-atoz/upgrade/postgres-6.6.2-6.6.3.sql | 2 +- .../6.6.2-6.6.3/set_singleton.sql | 0 .../default/6.6.5-6.6.6/set_singleton.sql | 8 +-- .../upgrade/oracle-se-6.6.0-6.6.1.sql | 2 +- .../upgrade/oracle-se-6.6.5-6.6.6.sql | 2 +- .../oracle-se/6.6.5-6.6.6/set_singleton.sql | 23 ++++++++ .../ccm-core/upgrade/postgres-6.6.5-6.6.6.sql | 2 +- .../postgres/6.6.5-6.6.6/set_singleton.sql | 23 ++++++++ .../com/arsdigita/util/jdbc/Connections.java | 54 +++++++++---------- .../upgrade/oracle-se-6.6.1-6.6.2.sql | 2 +- .../upgrade/oracle-se/set_singleton.sql | 20 +++++++ .../upgrade/postgres-6.6.1-6.6.2.sql | 2 +- .../set_singleton.sql | 0 .../upgrade/6.6.2-6.6.3/set_singleton.sql | 20 +++++++ .../upgrade/6.6.2-6.6.3/set_singleton.sql | 0 .../upgrade/oracle-se-6.6.2-6.6.3.sql | 2 +- .../upgrade/postgres-6.6.2-6.6.3.sql | 2 +- .../default/6.6.0-6.6.1/add_constraints.sql | 2 +- .../default/6.6.0-6.6.1/upd_system_tables.sql | 21 ++++---- .../upgrade/oracle-se-6.6.0-6.6.1.sql | 2 + .../default/6.6.0-6.6.1/upd_system_tables.sql | 2 +- .../upgrade/oracle-se-6.6.1-6.6.2.sql | 2 +- .../oracle-se/6.6.1-6.6.2/set_singleton.sql | 20 +++++++ .../upgrade/postgres-6.6.1-6.6.2.sql | 2 +- .../6.6.1-6.6.2/set_singleton.sql | 0 .../6.6.0-6.6.1/remove_legacy_entries.sql | 6 +++ .../default/6.6.0-6.6.1/upd_system_tables.sql | 7 ++- .../upgrade/oracle-se-6.6.1-6.6.2.sql | 2 +- .../oracle-se/6.6.1-6.6.2/set_singleton.sql | 22 ++++++++ .../upgrade/postgres-6.6.1-6.6.2.sql | 2 +- .../6.6.1-6.6.2/set_singleton.sql | 0 .../6.6.0-6.6.1/adjust_app_properties.sql | 8 +-- .../default/6.6.0-6.6.1/upd_system_tables.sql | 15 +++--- .../upgrade/oracle-se-6.6.1-6.6.2.sql | 2 +- .../oracle-se/6.6.1-6.6.2/set_singleton.sql | 21 ++++++++ .../upgrade/postgres-6.6.1-6.6.2.sql | 2 +- .../6.6.1-6.6.2/set_singleton.sql | 0 .../default/6.6.0-6.6.1/upd_system_tables.sql | 20 ++++--- .../default/6.6.1-6.6.2/upd_system_tables.sql | 12 ++--- .../upgrade/oracle-se-6.6.2-6.6.3.sql | 2 +- .../oracle-se/6.6.2-6.6.3/set_singleton.sql | 21 ++++++++ .../upgrade/postgres-6.6.2-6.6.3.sql | 2 +- .../6.6.2-6.6.3/set_singleton.sql | 0 46 files changed, 307 insertions(+), 115 deletions(-) create mode 100644 ccm-atoz/sql/ccm-atoz/upgrade/oracle-se/6.6.2-6.6.3/set_singleton.sql rename ccm-atoz/sql/ccm-atoz/upgrade/{default => postgres}/6.6.2-6.6.3/set_singleton.sql (100%) create mode 100644 ccm-core/sql/ccm-core/upgrade/oracle-se/6.6.5-6.6.6/set_singleton.sql create mode 100644 ccm-core/sql/ccm-core/upgrade/postgres/6.6.5-6.6.6/set_singleton.sql create mode 100644 ccm-ldn-search/sql/ccm-ldn-search/upgrade/oracle-se/set_singleton.sql rename ccm-ldn-search/sql/ccm-ldn-search/upgrade/{default/6.6.1-6.6.2 => postgres}/set_singleton.sql (100%) create mode 100644 ccm-ldn-terms/sql/ccm-ldn-terms/oracle-se/upgrade/6.6.2-6.6.3/set_singleton.sql rename ccm-ldn-terms/sql/ccm-ldn-terms/{default => postgres}/upgrade/6.6.2-6.6.3/set_singleton.sql (100%) create mode 100644 ccm-rssfeed/sql/ccm-rssfeed/upgrade/oracle-se/6.6.1-6.6.2/set_singleton.sql rename ccm-rssfeed/sql/ccm-rssfeed/upgrade/{default => postgres}/6.6.1-6.6.2/set_singleton.sql (100%) create mode 100644 ccm-shortcuts/sql/ccm-shortcuts/upgrade/oracle-se/6.6.1-6.6.2/set_singleton.sql rename ccm-shortcuts/sql/ccm-shortcuts/upgrade/{default => postgres}/6.6.1-6.6.2/set_singleton.sql (100%) create mode 100644 ccm-subsite/sql/ccm-subsite/upgrade/oracle-se/6.6.1-6.6.2/set_singleton.sql rename ccm-subsite/sql/ccm-subsite/upgrade/{default => postgres}/6.6.1-6.6.2/set_singleton.sql (100%) create mode 100644 ccm-themedirector/sql/ccm-themedirector/upgrade/oracle-se/6.6.2-6.6.3/set_singleton.sql rename ccm-themedirector/sql/ccm-themedirector/upgrade/{default => postgres}/6.6.2-6.6.3/set_singleton.sql (100%) diff --git a/ccm-atoz/sql/ccm-atoz/upgrade/default/6.6.1-6.6.2/upd_system_tables.sql b/ccm-atoz/sql/ccm-atoz/upgrade/default/6.6.1-6.6.2/upd_system_tables.sql index 1c284cdff..3dfcd1fa0 100644 --- a/ccm-atoz/sql/ccm-atoz/upgrade/default/6.6.1-6.6.2/upd_system_tables.sql +++ b/ccm-atoz/sql/ccm-atoz/upgrade/default/6.6.1-6.6.2/upd_system_tables.sql @@ -44,7 +44,7 @@ ALTER TABLE init_requirements update application_types - set object_type=replace(object_type,'london.atoz.AtoZ','atoz.AtoZ') + set object_type = replace(object_type,'london.atoz.AtoZ','atoz.AtoZ') where object_type like '%london.atoz.AtoZ%' ; -- table applications doesn't require an update @@ -69,32 +69,31 @@ update application_types -- update atoz in acs_objects -- replace String london.atoz by atoz for all atoz.AtoZ* update acs_objects - set (object_type,default_domain_class) = - (replace(object_type,'london.atoz', 'atoz') , - replace(default_domain_class,'london.atoz', 'atoz') ) - where object_type like '%london.atoz.AtoZ%' ; + set object_type = replace(object_type,'london.atoz', 'atoz'), + default_domain_class = replace(default_domain_class,'london.atoz', 'atoz') + where object_type like '%london.atoz.AtoZ%' ; + -- rename AtoZItemProvider to ItemProvider update acs_objects - set (object_type,default_domain_class) = - (replace(object_type,'AtoZItemProvider', 'ItemProvider') , - replace(default_domain_class,'AtoZItemProvider', 'ItemProvider') ) - where object_type like '%AtoZItemProvider%' ; + set object_type = replace(object_type,'AtoZItemProvider', 'ItemProvider'), + default_domain_class = replace(default_domain_class,'AtoZItemProvider', 'ItemProvider') + where object_type like '%AtoZItemProvider%' ; + -- rename AtoZCategoryProvider to CategoryProvider update acs_objects - set (object_type,default_domain_class) = - (replace(object_type,'AtoZCategoryProvider', 'CategoryProvider') , - replace(default_domain_class,'AtoZCategoryProvider', 'CategoryProvider') ) - where object_type like '%AtoZCategoryProvider%' ; + set object_type = replace(object_type,'AtoZCategoryProvider', 'CategoryProvider'), + defualt_domain_class = replace(default_domain_class,'AtoZCategoryProvider', 'CategoryProvider') + where object_type like '%AtoZCategoryProvider%' ; + -- rename AtoZSiteProxyProvider to siteproxy.SiteProxyProvider update acs_objects - set (object_type,default_domain_class) = - (replace(object_type,'AtoZSiteProxyProvider', 'siteproxy.SiteProxyProvider') , - replace(default_domain_class,'AtoZSiteProxyProvider', 'siteproxy.SiteProxyProvider') ) - where object_type like '%AtoZSiteProxyProvider%' ; + set object_type = replace(object_type,'AtoZSiteProxyProvider', 'siteproxy.SiteProxyProvider'), + default_domain_class = replace(default_domain_class,'AtoZSiteProxyProvider', 'siteproxy.SiteProxyProvider') + where object_type like '%AtoZSiteProxyProvider%' ; + -- rename terms.DomainProvider to DomainProvider update acs_objects - set (object_type,default_domain_class) = - (replace(object_type,'terms.DomainProvider', 'DomainProvider') , - replace(default_domain_class,'terms.DomainProvider', 'DomainProvider') ) - where object_type like '%atoz.terms.DomainProvider%' ; + set object_type = replace(object_type,'terms.DomainProvider', 'DomainProvider'), + default_domain_class = replace(default_domain_class,'terms.DomainProvider', 'DomainProvider') + where object_type like '%atoz.terms.DomainProvider%' ; diff --git a/ccm-atoz/sql/ccm-atoz/upgrade/oracle-se-6.6.2-6.6.3.sql b/ccm-atoz/sql/ccm-atoz/upgrade/oracle-se-6.6.2-6.6.3.sql index 2fcbecedf..239fa9f6a 100644 --- a/ccm-atoz/sql/ccm-atoz/upgrade/oracle-se-6.6.2-6.6.3.sql +++ b/ccm-atoz/sql/ccm-atoz/upgrade/oracle-se-6.6.2-6.6.3.sql @@ -17,4 +17,4 @@ -- -- $Id$ -@@ default/6.6.2-6.6.3/set_singleton.sql \ No newline at end of file +@@ oracle-se/6.6.2-6.6.3/set_singleton.sql \ No newline at end of file diff --git a/ccm-atoz/sql/ccm-atoz/upgrade/oracle-se/6.6.2-6.6.3/set_singleton.sql b/ccm-atoz/sql/ccm-atoz/upgrade/oracle-se/6.6.2-6.6.3/set_singleton.sql new file mode 100644 index 000000000..e532d9f09 --- /dev/null +++ b/ccm-atoz/sql/ccm-atoz/upgrade/oracle-se/6.6.2-6.6.3/set_singleton.sql @@ -0,0 +1,20 @@ +-- +-- Copyright (C) 2013 Jens Pelzetter All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id$ + +UPDATE application_types SET singleton_p = '0' WHERE object_type = 'com.arsdigita.atoz.AtoZ'; \ No newline at end of file diff --git a/ccm-atoz/sql/ccm-atoz/upgrade/postgres-6.6.2-6.6.3.sql b/ccm-atoz/sql/ccm-atoz/upgrade/postgres-6.6.2-6.6.3.sql index e665ef722..54104ac99 100644 --- a/ccm-atoz/sql/ccm-atoz/upgrade/postgres-6.6.2-6.6.3.sql +++ b/ccm-atoz/sql/ccm-atoz/upgrade/postgres-6.6.2-6.6.3.sql @@ -19,6 +19,6 @@ begin; -\i default/6.6.2-6.6.3/set_singleton.sql +\i postgres/6.6.2-6.6.3/set_singleton.sql commit; diff --git a/ccm-atoz/sql/ccm-atoz/upgrade/default/6.6.2-6.6.3/set_singleton.sql b/ccm-atoz/sql/ccm-atoz/upgrade/postgres/6.6.2-6.6.3/set_singleton.sql similarity index 100% rename from ccm-atoz/sql/ccm-atoz/upgrade/default/6.6.2-6.6.3/set_singleton.sql rename to ccm-atoz/sql/ccm-atoz/upgrade/postgres/6.6.2-6.6.3/set_singleton.sql diff --git a/ccm-core/sql/ccm-core/upgrade/default/6.6.5-6.6.6/set_singleton.sql b/ccm-core/sql/ccm-core/upgrade/default/6.6.5-6.6.6/set_singleton.sql index 287239187..3c897d22c 100644 --- a/ccm-core/sql/ccm-core/upgrade/default/6.6.5-6.6.6/set_singleton.sql +++ b/ccm-core/sql/ccm-core/upgrade/default/6.6.5-6.6.6/set_singleton.sql @@ -17,7 +17,7 @@ -- -- $Id$ -UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.ui.admin.Admin'; -UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.ui.login.Login'; -UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.ui.permissions.Permissions'; -UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.webdevsupport.WebDevSupport'; +UPDATE application_types SET singleton_p = 1 WHERE object_type = 'com.arsdigita.ui.admin.Admin'; +UPDATE application_types SET singleton_p = 1 WHERE object_type = 'com.arsdigita.ui.login.Login'; +UPDATE application_types SET singleton_p = 1 WHERE object_type = 'com.arsdigita.ui.permissions.Permissions'; +UPDATE application_types SET singleton_p = 1 WHERE object_type = 'com.arsdigita.webdevsupport.WebDevSupport'; diff --git a/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.0-6.6.1.sql b/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.0-6.6.1.sql index cb570abb8..98c6137af 100644 --- a/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.0-6.6.1.sql +++ b/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.0-6.6.1.sql @@ -20,4 +20,4 @@ PROMPT Red Hat Enterprise CORE 6.6.0 -> 6.6.1 Upgrade Script (Oracle) @@ default/6.6.0-6.6.1/drop_tables_acs_stylesheets.sql -@@ oracle-se/6.6.0-6.6.1/recreate_users_index.sql \ No newline at end of file +-- not needed for oracle @@ oracle-se/6.6.0-6.6.1/recreate_users_index.sql \ No newline at end of file diff --git a/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.5-6.6.6.sql b/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.5-6.6.6.sql index 9c7b42f5b..2e131182e 100644 --- a/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.5-6.6.6.sql +++ b/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.5-6.6.6.sql @@ -21,5 +21,5 @@ PROMPT Red Hat Enterprise CORE 6.6.5 -> 6.6.6 Upgrade Script (Oracle) -- -@@ default/6.6.5-6.6.6/set_singleton.sql +@@ oracle-se/6.6.5-6.6.6/set_singleton.sql @@ default/6.6.5-6.6.6/add_cat_visible.sql diff --git a/ccm-core/sql/ccm-core/upgrade/oracle-se/6.6.5-6.6.6/set_singleton.sql b/ccm-core/sql/ccm-core/upgrade/oracle-se/6.6.5-6.6.6/set_singleton.sql new file mode 100644 index 000000000..359cc9a6d --- /dev/null +++ b/ccm-core/sql/ccm-core/upgrade/oracle-se/6.6.5-6.6.6/set_singleton.sql @@ -0,0 +1,23 @@ +-- +-- Copyright (C) 2013 Jens Pelzetter. All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id$ + +UPDATE application_types SET singleton_p = '1' WHERE object_type = 'com.arsdigita.ui.admin.Admin'; +UPDATE application_types SET singleton_p = '1' WHERE object_type = 'com.arsdigita.ui.login.Login'; +UPDATE application_types SET singleton_p = '1' WHERE object_type = 'com.arsdigita.ui.permissions.Permissions'; +UPDATE application_types SET singleton_p = '1' WHERE object_type = 'com.arsdigita.webdevsupport.WebDevSupport'; diff --git a/ccm-core/sql/ccm-core/upgrade/postgres-6.6.5-6.6.6.sql b/ccm-core/sql/ccm-core/upgrade/postgres-6.6.5-6.6.6.sql index 04afd3615..6f7af73b1 100644 --- a/ccm-core/sql/ccm-core/upgrade/postgres-6.6.5-6.6.6.sql +++ b/ccm-core/sql/ccm-core/upgrade/postgres-6.6.5-6.6.6.sql @@ -24,7 +24,7 @@ begin; -\i default/6.6.5-6.6.6/set_singleton.sql +\i postgres/6.6.5-6.6.6/set_singleton.sql \i default/6.6.5-6.6.6/add_cat_visible.sql commit; diff --git a/ccm-core/sql/ccm-core/upgrade/postgres/6.6.5-6.6.6/set_singleton.sql b/ccm-core/sql/ccm-core/upgrade/postgres/6.6.5-6.6.6/set_singleton.sql new file mode 100644 index 000000000..287239187 --- /dev/null +++ b/ccm-core/sql/ccm-core/upgrade/postgres/6.6.5-6.6.6/set_singleton.sql @@ -0,0 +1,23 @@ +-- +-- Copyright (C) 2013 Jens Pelzetter. All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id$ + +UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.ui.admin.Admin'; +UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.ui.login.Login'; +UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.ui.permissions.Permissions'; +UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.webdevsupport.WebDevSupport'; diff --git a/ccm-core/src/com/arsdigita/util/jdbc/Connections.java b/ccm-core/src/com/arsdigita/util/jdbc/Connections.java index 7a8e19afc..f8bdf8b27 100755 --- a/ccm-core/src/com/arsdigita/util/jdbc/Connections.java +++ b/ccm-core/src/com/arsdigita/util/jdbc/Connections.java @@ -31,8 +31,7 @@ import java.util.Properties; import org.apache.log4j.Logger; /** - * A collection of static utility methods for dealing with JDBC - * connections. + * A collection of static utility methods for dealing with JDBC connections. * * @author Justin Ross */ @@ -41,9 +40,8 @@ public final class Connections { private static final Logger s_log = Logger.getLogger(Connections.class); /** - * Acquires a single connection using url. This - * method takes care of loading the appropriate driver and turning - * auto-commit off. + * Acquires a single connection using url. This method takes care of loading the + * appropriate driver and turning auto-commit off. * * @param url A String JDBC URL */ @@ -54,37 +52,40 @@ public final class Connections { try { switch (database) { - case DbHelper.DB_POSTGRES: - Classes.loadClass("org.postgresql.Driver"); - break; - case DbHelper.DB_ORACLE: - Classes.loadClass("oracle.jdbc.driver.OracleDriver"); - break; + case DbHelper.DB_POSTGRES: + Classes.loadClass("org.postgresql.Driver"); + break; + case DbHelper.DB_ORACLE: + Classes.loadClass("oracle.jdbc.driver.OracleDriver"); + break; } Properties props = new Properties(); - props.setProperty("stringtype", "unspecified"); + + if (database == DbHelper.DB_POSTGRES) { + props.setProperty("stringtype", "unspecified"); + } final Connection conn = DriverManager.getConnection(url, props); Assert.exists(conn, Connection.class); conn.setAutoCommit(false); - - if(s_log.isDebugEnabled()) { + + if (s_log.isDebugEnabled()) { if (conn.getTransactionIsolation() == Connection.TRANSACTION_NONE) { - s_log.debug("transactionIsoliation = NONE"); - } else if(conn.getTransactionIsolation() == Connection.TRANSACTION_READ_COMMITTED) { - s_log.debug("transactionIsoliation = READ_COMMITED"); - } else if(conn.getTransactionIsolation() == Connection.TRANSACTION_READ_UNCOMMITTED) { - s_log.debug("transactionIsoliation = READ_UNCOMMITTED"); - } else if(conn.getTransactionIsolation() == Connection.TRANSACTION_REPEATABLE_READ) { + s_log.debug("transactionIsoliation = NONE"); + } else if (conn.getTransactionIsolation() == Connection.TRANSACTION_READ_COMMITTED) { + s_log.debug("transactionIsoliation = READ_COMMITED"); + } else if (conn.getTransactionIsolation() == Connection.TRANSACTION_READ_UNCOMMITTED) { + s_log.debug("transactionIsoliation = READ_UNCOMMITTED"); + } else if (conn.getTransactionIsolation() == Connection.TRANSACTION_REPEATABLE_READ) { s_log.debug("transactionIsoliation = REPEATABLE_READ"); - } else if(conn.getTransactionIsolation() == Connection.TRANSACTION_SERIALIZABLE) { + } else if (conn.getTransactionIsolation() == Connection.TRANSACTION_SERIALIZABLE) { s_log.debug("transactionIsoliation = SERIALIZABLE"); } } - + // This is a workaround for a bug in certain versions of // oracle that cause oracle to erroneously report parse // errors or 0600 errors when a UNION ALL is used in a @@ -92,12 +93,10 @@ public final class Connections { DatabaseMetaData meta = conn.getMetaData(); String product = meta.getDatabaseProductName(); String version = meta.getDatabaseProductVersion(); - if ("Oracle".equals(product) && - (version.indexOf("9.0.1") != -1 || - version.indexOf("9.2.0.1.0") != -1)) { + if ("Oracle".equals(product) && (version.indexOf("9.0.1") != -1 || version.indexOf( + "9.2.0.1.0") != -1)) { final Statement stmt = conn.createStatement(); - stmt.execute - ("alter session set \"_push_join_union_view\" = false"); + stmt.execute("alter session set \"_push_join_union_view\" = false"); stmt.close(); } @@ -106,4 +105,5 @@ public final class Connections { throw new UncheckedWrapperException(e); } } + } diff --git a/ccm-ldn-search/sql/ccm-ldn-search/upgrade/oracle-se-6.6.1-6.6.2.sql b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/oracle-se-6.6.1-6.6.2.sql index 85575cacb..acd199b7f 100644 --- a/ccm-ldn-search/sql/ccm-ldn-search/upgrade/oracle-se-6.6.1-6.6.2.sql +++ b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/oracle-se-6.6.1-6.6.2.sql @@ -17,4 +17,4 @@ -- -- $Id$ -@@ default/6.6.1-6.6.2/set_singleton.sql \ No newline at end of file +@@ oracle-se/6.6.1-6.6.2/set_singleton.sql \ No newline at end of file diff --git a/ccm-ldn-search/sql/ccm-ldn-search/upgrade/oracle-se/set_singleton.sql b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/oracle-se/set_singleton.sql new file mode 100644 index 000000000..73069c531 --- /dev/null +++ b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/oracle-se/set_singleton.sql @@ -0,0 +1,20 @@ +-- +-- Copyright (C) 2013 Jens Pelzetter All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id$ + +UPDATE application_types SET singleton_p = '1' WHERE object_type = 'com.arsdigita.london.search.Search'; \ No newline at end of file diff --git a/ccm-ldn-search/sql/ccm-ldn-search/upgrade/postgres-6.6.1-6.6.2.sql b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/postgres-6.6.1-6.6.2.sql index 6614dda79..e3580ac55 100644 --- a/ccm-ldn-search/sql/ccm-ldn-search/upgrade/postgres-6.6.1-6.6.2.sql +++ b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/postgres-6.6.1-6.6.2.sql @@ -21,6 +21,6 @@ begin; -\i default/6.6.1-6.6.2/set_singleton.sql +\i postgres/6.6.1-6.6.2/set_singleton.sql commit; diff --git a/ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.1-6.6.2/set_singleton.sql b/ccm-ldn-search/sql/ccm-ldn-search/upgrade/postgres/set_singleton.sql similarity index 100% rename from ccm-ldn-search/sql/ccm-ldn-search/upgrade/default/6.6.1-6.6.2/set_singleton.sql rename to ccm-ldn-search/sql/ccm-ldn-search/upgrade/postgres/set_singleton.sql diff --git a/ccm-ldn-terms/sql/ccm-ldn-terms/oracle-se/upgrade/6.6.2-6.6.3/set_singleton.sql b/ccm-ldn-terms/sql/ccm-ldn-terms/oracle-se/upgrade/6.6.2-6.6.3/set_singleton.sql new file mode 100644 index 000000000..521849503 --- /dev/null +++ b/ccm-ldn-terms/sql/ccm-ldn-terms/oracle-se/upgrade/6.6.2-6.6.3/set_singleton.sql @@ -0,0 +1,20 @@ +-- +-- Copyright (C) 2013 Jens Pelzetter All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id$ + +UPDATE application_types SET singleton_p = '1' WHERE object_type = 'com.arsdigita.london.terms.Terms'; \ No newline at end of file diff --git a/ccm-ldn-terms/sql/ccm-ldn-terms/default/upgrade/6.6.2-6.6.3/set_singleton.sql b/ccm-ldn-terms/sql/ccm-ldn-terms/postgres/upgrade/6.6.2-6.6.3/set_singleton.sql similarity index 100% rename from ccm-ldn-terms/sql/ccm-ldn-terms/default/upgrade/6.6.2-6.6.3/set_singleton.sql rename to ccm-ldn-terms/sql/ccm-ldn-terms/postgres/upgrade/6.6.2-6.6.3/set_singleton.sql diff --git a/ccm-ldn-terms/sql/ccm-ldn-terms/upgrade/oracle-se-6.6.2-6.6.3.sql b/ccm-ldn-terms/sql/ccm-ldn-terms/upgrade/oracle-se-6.6.2-6.6.3.sql index ca9825c9c..680c6e006 100644 --- a/ccm-ldn-terms/sql/ccm-ldn-terms/upgrade/oracle-se-6.6.2-6.6.3.sql +++ b/ccm-ldn-terms/sql/ccm-ldn-terms/upgrade/oracle-se-6.6.2-6.6.3.sql @@ -19,4 +19,4 @@ PROMPT Red Hat Enterprise TERMS 6.6.2 -> 6.6.3 Upgrade Script (Oracle) -@@ ../default/upgrade/6.6.2-6.6.3/set_singleton.sql +@@ ../oracle-se/upgrade/6.6.2-6.6.3/set_singleton.sql diff --git a/ccm-ldn-terms/sql/ccm-ldn-terms/upgrade/postgres-6.6.2-6.6.3.sql b/ccm-ldn-terms/sql/ccm-ldn-terms/upgrade/postgres-6.6.2-6.6.3.sql index fca4c3361..0c88cef87 100644 --- a/ccm-ldn-terms/sql/ccm-ldn-terms/upgrade/postgres-6.6.2-6.6.3.sql +++ b/ccm-ldn-terms/sql/ccm-ldn-terms/upgrade/postgres-6.6.2-6.6.3.sql @@ -21,6 +21,6 @@ begin; -\i ../default/upgrade/6.6.2-6.6.3/set_singleton.sql +\i ../postgres/upgrade/6.6.2-6.6.3/set_singleton.sql commit; diff --git a/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.6.0-6.6.1/add_constraints.sql b/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.6.0-6.6.1/add_constraints.sql index 7d7c925c8..cc884c160 100644 --- a/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.6.0-6.6.1/add_constraints.sql +++ b/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.6.0-6.6.1/add_constraints.sql @@ -38,7 +38,7 @@ ALTER TABLE pw_workspace_themes ALTER TABLE pw_workspaces ADD CONSTRAINT pw_workspac_workspa_id_p_knd54 PRIMARY KEY (workspace_id); -CREATE INDEX pw_workspaces_party_id_idx ON pw_workspaces USING btree (party_id); +CREATE INDEX pw_workspaces_party_id_idx ON pw_workspaces(party_id); ALTER TABLE pw_workspace_themeapplications ADD CONSTRAINT pw_wor_them_the_app_id_f_p_hb1 FOREIGN KEY (theme_app_id) diff --git a/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql b/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql index 79050cd13..9f6ad588b 100644 --- a/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql +++ b/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql @@ -44,23 +44,22 @@ ALTER TABLE init_requirements REFERENCES inits (class_name); -update application_types - set object_type=replace(object_type,'london.portal', 'portalworkspace') - where object_type like '%london.portal%' ; +UPDATE application_types + SET object_type = REPLACE(object_type,'london.portal', 'portalworkspace') + WHERE object_type LIKE '%london.portal%' ; -- table applications doesn't require an update -update apm_package_types - set package_key=replace(package_key,'workspace', 'portalworkspace') - where package_key like 'workspace' ; +UPDATE apm_package_types + SET package_key = REPLACE(package_key,'workspace', 'portalworkspace') + WHERE package_key LIKE 'workspace' ; -- table apm_packages doesn't require an update either -- table site_nodes doesn't require an update either -- update application type in acs_objects -update acs_objects - set (object_type,default_domain_class) = - (replace(object_type,'london.portal', 'portalworkspace') , - replace(default_domain_class,'london.portal', 'portalworkspace') ) - where object_type like '%london.portal%' ; +UPDATE acs_objects + SET object_type = REPLACE(object_type,'london.portal', 'portalworkspace'), + default_domain_class = REPLACE(default_domain_class,'london.portal', 'portalworkspace') + WHERE object_type LIKE '%london.portal%' ; diff --git a/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.6.0-6.6.1.sql b/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.6.0-6.6.1.sql index 4e98f5bdc..e225d1b4c 100755 --- a/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.6.0-6.6.1.sql +++ b/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.6.0-6.6.1.sql @@ -28,3 +28,5 @@ @@ default/6.6.0-6.6.1/add_constraints.sql @@ default/6.6.0-6.6.1/upd_system_tables.sql + + diff --git a/ccm-rssfeed/sql/ccm-rssfeed/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql b/ccm-rssfeed/sql/ccm-rssfeed/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql index 90040dc39..1161202f5 100644 --- a/ccm-rssfeed/sql/ccm-rssfeed/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql +++ b/ccm-rssfeed/sql/ccm-rssfeed/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql @@ -45,7 +45,7 @@ ALTER TABLE init_requirements UPDATE application_types - SET object_type = REPLACE(object_type,'london.rss.RSS', 'rssfeed.RSSFeed', + SET object_type = REPLACE(object_type,'london.rss.RSS', 'rssfeed.RSSFeed'), title = 'RSS Feed', description = 'Provides RSS feed service' WHERE object_type LIKE '%london.rss.RSS%'; diff --git a/ccm-rssfeed/sql/ccm-rssfeed/upgrade/oracle-se-6.6.1-6.6.2.sql b/ccm-rssfeed/sql/ccm-rssfeed/upgrade/oracle-se-6.6.1-6.6.2.sql index 336473355..4ed389cdf 100644 --- a/ccm-rssfeed/sql/ccm-rssfeed/upgrade/oracle-se-6.6.1-6.6.2.sql +++ b/ccm-rssfeed/sql/ccm-rssfeed/upgrade/oracle-se-6.6.1-6.6.2.sql @@ -17,4 +17,4 @@ -- -- $Id$ -@@ default/6.6.1-6.6.2/set_singleton.sql +@@ oracle-se/6.6.1-6.6.2/set_singleton.sql diff --git a/ccm-rssfeed/sql/ccm-rssfeed/upgrade/oracle-se/6.6.1-6.6.2/set_singleton.sql b/ccm-rssfeed/sql/ccm-rssfeed/upgrade/oracle-se/6.6.1-6.6.2/set_singleton.sql new file mode 100644 index 000000000..fde9e8f4c --- /dev/null +++ b/ccm-rssfeed/sql/ccm-rssfeed/upgrade/oracle-se/6.6.1-6.6.2/set_singleton.sql @@ -0,0 +1,20 @@ +-- +-- Copyright (C) 2013 Jens Pelzetter All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id$ + +UPDATE application_types SET singleton_p = '1' WHERE object_type = 'com.arsdigita.rssfeed.RSSFeed'; \ No newline at end of file diff --git a/ccm-rssfeed/sql/ccm-rssfeed/upgrade/postgres-6.6.1-6.6.2.sql b/ccm-rssfeed/sql/ccm-rssfeed/upgrade/postgres-6.6.1-6.6.2.sql index a056e3b27..59f35fb0f 100644 --- a/ccm-rssfeed/sql/ccm-rssfeed/upgrade/postgres-6.6.1-6.6.2.sql +++ b/ccm-rssfeed/sql/ccm-rssfeed/upgrade/postgres-6.6.1-6.6.2.sql @@ -21,6 +21,6 @@ begin; -\i default/6.6.1-6.6.2/set_singleton.sql +\i postgres/6.6.1-6.6.2/set_singleton.sql commit; diff --git a/ccm-rssfeed/sql/ccm-rssfeed/upgrade/default/6.6.1-6.6.2/set_singleton.sql b/ccm-rssfeed/sql/ccm-rssfeed/upgrade/postgres/6.6.1-6.6.2/set_singleton.sql similarity index 100% rename from ccm-rssfeed/sql/ccm-rssfeed/upgrade/default/6.6.1-6.6.2/set_singleton.sql rename to ccm-rssfeed/sql/ccm-rssfeed/upgrade/postgres/6.6.1-6.6.2/set_singleton.sql diff --git a/ccm-shortcuts/sql/ccm-shortcuts/upgrade/default/6.6.0-6.6.1/remove_legacy_entries.sql b/ccm-shortcuts/sql/ccm-shortcuts/upgrade/default/6.6.0-6.6.1/remove_legacy_entries.sql index 509408f11..07e1a0bd7 100644 --- a/ccm-shortcuts/sql/ccm-shortcuts/upgrade/default/6.6.0-6.6.1/remove_legacy_entries.sql +++ b/ccm-shortcuts/sql/ccm-shortcuts/upgrade/default/6.6.0-6.6.1/remove_legacy_entries.sql @@ -54,6 +54,7 @@ delete from site_nodes where object_type like '%shortcuts.Shortcuts%') ); + alter table site_nodes add constraint site_nodes_node_id_f_n1m2y FOREIGN KEY (node_id) REFERENCES acs_objects (object_id); @@ -71,7 +72,9 @@ delete from object_context -- delete from acs_objects all entries referring to package_id in apm_packages alter table apm_packages drop constraint apm_package_package_id_f_46may ; + alter table applications drop constraint application_package_id_f_cdaho ; + delete from acs_objects where object_id in (select package_id from apm_packages where package_type_id = @@ -94,6 +97,7 @@ delete from apm_packages -- delete all entries for subsite in apm_package_types identified by -- package_type_id in application_types alter table application_types drop constraint applica_typ_pac_typ_id_f_v80ma ; + delete from apm_package_types where package_type_id = (select package_type_id from application_types @@ -119,9 +123,11 @@ update application_types alter table application_types add constraint applica_typ_pac_typ_id_f_v80ma FOREIGN KEY (package_type_id) REFERENCES apm_package_types (package_type_id); + alter table applications add constraint application_package_id_f_cdaho FOREIGN KEY (package_id) REFERENCES apm_packages (package_id); + alter table apm_packages add constraint apm_package_package_id_f_46may FOREIGN KEY (package_id) REFERENCES acs_objects (object_id); diff --git a/ccm-shortcuts/sql/ccm-shortcuts/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql b/ccm-shortcuts/sql/ccm-shortcuts/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql index 22f3c4327..478a95109 100644 --- a/ccm-shortcuts/sql/ccm-shortcuts/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql +++ b/ccm-shortcuts/sql/ccm-shortcuts/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql @@ -61,7 +61,6 @@ update application_types -- update application type in acs_objects update acs_objects - set (object_type,default_domain_class) = - (replace(object_type,'london.shortcuts', 'shortcuts') , - replace(default_domain_class,'london.shortcuts', 'shortcuts') ) - where object_type like '%london.shortcuts%' ; + set object_type = replace(object_type,'london.shortcuts', 'shortcuts'), + default_domain_class = replace(default_domain_class,'london.shortcuts', 'shortcuts') + where object_type like '%london.shortcuts%' ; diff --git a/ccm-shortcuts/sql/ccm-shortcuts/upgrade/oracle-se-6.6.1-6.6.2.sql b/ccm-shortcuts/sql/ccm-shortcuts/upgrade/oracle-se-6.6.1-6.6.2.sql index 85575cacb..acd199b7f 100644 --- a/ccm-shortcuts/sql/ccm-shortcuts/upgrade/oracle-se-6.6.1-6.6.2.sql +++ b/ccm-shortcuts/sql/ccm-shortcuts/upgrade/oracle-se-6.6.1-6.6.2.sql @@ -17,4 +17,4 @@ -- -- $Id$ -@@ default/6.6.1-6.6.2/set_singleton.sql \ No newline at end of file +@@ oracle-se/6.6.1-6.6.2/set_singleton.sql \ No newline at end of file diff --git a/ccm-shortcuts/sql/ccm-shortcuts/upgrade/oracle-se/6.6.1-6.6.2/set_singleton.sql b/ccm-shortcuts/sql/ccm-shortcuts/upgrade/oracle-se/6.6.1-6.6.2/set_singleton.sql new file mode 100644 index 000000000..2ed7b236c --- /dev/null +++ b/ccm-shortcuts/sql/ccm-shortcuts/upgrade/oracle-se/6.6.1-6.6.2/set_singleton.sql @@ -0,0 +1,22 @@ +-- +-- Copyright (C) 2013 Jens Pelzetter All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id$ + +UPDATE application_types + SET singleton_p = '1' + WHERE object_type = 'com.arsdigita.shortcuts.Shortcuts'; \ No newline at end of file diff --git a/ccm-shortcuts/sql/ccm-shortcuts/upgrade/postgres-6.6.1-6.6.2.sql b/ccm-shortcuts/sql/ccm-shortcuts/upgrade/postgres-6.6.1-6.6.2.sql index d81fb8f75..3b67ffadc 100644 --- a/ccm-shortcuts/sql/ccm-shortcuts/upgrade/postgres-6.6.1-6.6.2.sql +++ b/ccm-shortcuts/sql/ccm-shortcuts/upgrade/postgres-6.6.1-6.6.2.sql @@ -21,6 +21,6 @@ begin; -\i default/6.6.1-6.6.2/set_singleton.sql +\i postgres/6.6.1-6.6.2/set_singleton.sql commit; diff --git a/ccm-shortcuts/sql/ccm-shortcuts/upgrade/default/6.6.1-6.6.2/set_singleton.sql b/ccm-shortcuts/sql/ccm-shortcuts/upgrade/postgres/6.6.1-6.6.2/set_singleton.sql similarity index 100% rename from ccm-shortcuts/sql/ccm-shortcuts/upgrade/default/6.6.1-6.6.2/set_singleton.sql rename to ccm-shortcuts/sql/ccm-shortcuts/upgrade/postgres/6.6.1-6.6.2/set_singleton.sql diff --git a/ccm-subsite/sql/ccm-subsite/upgrade/default/6.6.0-6.6.1/adjust_app_properties.sql b/ccm-subsite/sql/ccm-subsite/upgrade/default/6.6.0-6.6.1/adjust_app_properties.sql index 1ddfe2bc0..d7a0b1436 100644 --- a/ccm-subsite/sql/ccm-subsite/upgrade/default/6.6.0-6.6.1/adjust_app_properties.sql +++ b/ccm-subsite/sql/ccm-subsite/upgrade/default/6.6.0-6.6.1/adjust_app_properties.sql @@ -24,10 +24,10 @@ -- Rename title from CCM Subsite Admin to just Subsite update application_types - set title='Subsite' - where title like 'CMS Subsite Admin'; + set title='Subsite' + where title like 'CMS Subsite Admin'; -- Adjust description update application_types - set description='The CCM subsite administration application.' - where title like 'Subsite'; \ No newline at end of file + set description='The CCM subsite administration application.' + where title like 'Subsite'; \ No newline at end of file diff --git a/ccm-subsite/sql/ccm-subsite/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql b/ccm-subsite/sql/ccm-subsite/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql index 538e9d4a5..222d6718e 100644 --- a/ccm-subsite/sql/ccm-subsite/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql +++ b/ccm-subsite/sql/ccm-subsite/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql @@ -24,15 +24,15 @@ alter table init_requirements drop constraint init_requirements_init_f_cmmdn ; alter table init_requirements drop constraint init_require_requ_init_f_i6rgg ; update inits - set class_name=replace(class_name,'london.subsite', 'subsite') + set class_name = replace(class_name,'london.subsite', 'subsite') where class_name like '%london.subsite%' ; update init_requirements - set init=replace(init,'london.subsite', 'subsite') + set init = replace(init,'london.subsite', 'subsite') where init like '%london.subsite%' ; update init_requirements - set required_init=replace(required_init,'london.subsite', 'subsite') + set required_init = replace(required_init,'london.subsite', 'subsite') where required_init like '%london.subsite%' ; ALTER TABLE init_requirements @@ -45,7 +45,7 @@ ALTER TABLE init_requirements update application_types - set object_type=replace(object_type,'london.subsite', 'subsite') + set object_type = replace(object_type,'london.subsite', 'subsite') where object_type like '%london.subsite%' ; -- table applications doesn't require an update @@ -58,7 +58,6 @@ update application_types -- update application type in acs_objects update acs_objects - set (object_type,default_domain_class) = - (replace(object_type,'london.subsite', 'subsite') , - replace(default_domain_class,'london.subsite', 'subsite') ) - where object_type like '%london.subsite%' ; + set object_type = replace(object_type,'london.subsite', 'subsite'), + default_domain_class = replace(default_domain_class,'london.subsite', 'subsite') + where object_type like '%london.subsite%' ; diff --git a/ccm-subsite/sql/ccm-subsite/upgrade/oracle-se-6.6.1-6.6.2.sql b/ccm-subsite/sql/ccm-subsite/upgrade/oracle-se-6.6.1-6.6.2.sql index 336473355..7c543469c 100644 --- a/ccm-subsite/sql/ccm-subsite/upgrade/oracle-se-6.6.1-6.6.2.sql +++ b/ccm-subsite/sql/ccm-subsite/upgrade/oracle-se-6.6.1-6.6.2.sql @@ -17,4 +17,4 @@ -- -- $Id$ -@@ default/6.6.1-6.6.2/set_singleton.sql +@@ oracle/6.6.1-6.6.2/set_singleton.sql diff --git a/ccm-subsite/sql/ccm-subsite/upgrade/oracle-se/6.6.1-6.6.2/set_singleton.sql b/ccm-subsite/sql/ccm-subsite/upgrade/oracle-se/6.6.1-6.6.2/set_singleton.sql new file mode 100644 index 000000000..d41068220 --- /dev/null +++ b/ccm-subsite/sql/ccm-subsite/upgrade/oracle-se/6.6.1-6.6.2/set_singleton.sql @@ -0,0 +1,21 @@ +-- +-- Copyright (C) 2013 Jens Pelzetter All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id$ + +UPDATE application_types SET singleton_p = '1' + WHERE object_type = 'com.arsdigita.subsite.Subsite'; \ No newline at end of file diff --git a/ccm-subsite/sql/ccm-subsite/upgrade/postgres-6.6.1-6.6.2.sql b/ccm-subsite/sql/ccm-subsite/upgrade/postgres-6.6.1-6.6.2.sql index 421fb0de1..b02a3841d 100644 --- a/ccm-subsite/sql/ccm-subsite/upgrade/postgres-6.6.1-6.6.2.sql +++ b/ccm-subsite/sql/ccm-subsite/upgrade/postgres-6.6.1-6.6.2.sql @@ -21,6 +21,6 @@ begin; -\i default/6.6.1-6.6.2/set_singleton.sql +\i postgres/6.6.1-6.6.2/set_singleton.sql commit; diff --git a/ccm-subsite/sql/ccm-subsite/upgrade/default/6.6.1-6.6.2/set_singleton.sql b/ccm-subsite/sql/ccm-subsite/upgrade/postgres/6.6.1-6.6.2/set_singleton.sql similarity index 100% rename from ccm-subsite/sql/ccm-subsite/upgrade/default/6.6.1-6.6.2/set_singleton.sql rename to ccm-subsite/sql/ccm-subsite/upgrade/postgres/6.6.1-6.6.2/set_singleton.sql diff --git a/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql b/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql index 25972354e..d336b6d66 100644 --- a/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql +++ b/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql @@ -56,19 +56,17 @@ update applications -- update application type in acs_objects update acs_objects - set (object_type,display_name,default_domain_class) = - ('com.arsdigita.themedirector.ThemeDirector' , - 'CCM Themes Administration', - 'com.arsdigita.themedirector.ThemeDirector' ) - where default_domain_class like 'com.arsdigita.london.theme.ThemeApplication' ; + set object_type = 'com.arsdigita.themedirector.ThemeDirector', + display_name = 'CCM Themes Administration', + default_domain_class = 'com.arsdigita.themedirector.ThemeDirector' + where default_domain_class like 'com.arsdigita.london.theme.ThemeApplication' ; -- update themes in acs_objects update acs_objects - set display_name=replace(display_name,'london.theme', 'themedirector') - where default_domain_class like 'com.arsdigita.london.theme.Theme' ; + set display_name = replace(display_name,'london.theme', 'themedirector') + where default_domain_class like 'com.arsdigita.london.theme.Theme' ; update acs_objects - set (object_type,default_domain_class) = - ('com.arsdigita.themedirector.Theme' , - 'com.arsdigita.themedirector.Theme' ) - where default_domain_class like 'com.arsdigita.london.theme.Theme' ; + set object_type = 'com.arsdigita.themedirector.Theme', + default_domain_class = 'com.arsdigita.themedirector.Theme' + where default_domain_class like 'com.arsdigita.london.theme.Theme'; diff --git a/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.1-6.6.2/upd_system_tables.sql b/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.1-6.6.2/upd_system_tables.sql index e4fe8f745..94864c3a0 100644 --- a/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.1-6.6.2/upd_system_tables.sql +++ b/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.1-6.6.2/upd_system_tables.sql @@ -42,16 +42,16 @@ delete from apm_package_types where pretty_name like '%Theme%' ; delete from object_context - where object_id = (select acs_objects.object_id from acs_objects + where object_id = (select acs_objects.object_id from acs_objects where acs_objects.object_type - like '%com.arsdigita.kernel%' - AND acs_objects.display_name like '/admin/themes/') ; + like '%com.arsdigita.kernel%' + AND acs_objects.display_name like '/admin/themes/') ; delete from object_context - where object_id = (select acs_objects.object_id from acs_objects + where object_id = (select acs_objects.object_id from acs_objects where acs_objects.object_type - like '%com.arsdigita.kernel%' - AND acs_objects.display_name like 'CCM Themes Admin') ; + like '%com.arsdigita.kernel%' + AND acs_objects.display_name like 'CCM Themes Admin') ; delete from acs_objects where object_type like '%com.arsdigita.kernel%' diff --git a/ccm-themedirector/sql/ccm-themedirector/upgrade/oracle-se-6.6.2-6.6.3.sql b/ccm-themedirector/sql/ccm-themedirector/upgrade/oracle-se-6.6.2-6.6.3.sql index c7cde72da..da13c1ef3 100644 --- a/ccm-themedirector/sql/ccm-themedirector/upgrade/oracle-se-6.6.2-6.6.3.sql +++ b/ccm-themedirector/sql/ccm-themedirector/upgrade/oracle-se-6.6.2-6.6.3.sql @@ -17,4 +17,4 @@ -- -- $Id$ -@@ default/6.6.2-6.6.3/set_singleton.sql +@@ oracle-se/6.6.2-6.6.3/set_singleton.sql diff --git a/ccm-themedirector/sql/ccm-themedirector/upgrade/oracle-se/6.6.2-6.6.3/set_singleton.sql b/ccm-themedirector/sql/ccm-themedirector/upgrade/oracle-se/6.6.2-6.6.3/set_singleton.sql new file mode 100644 index 000000000..a18fe8ecd --- /dev/null +++ b/ccm-themedirector/sql/ccm-themedirector/upgrade/oracle-se/6.6.2-6.6.3/set_singleton.sql @@ -0,0 +1,21 @@ +-- +-- Copyright (C) 2013 Jens Pelzetter All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id$ + +UPDATE application_types SET singleton_p = '1' + WHERE object_type = 'com.arsdigita.themedirector.ThemeDirector'; \ No newline at end of file diff --git a/ccm-themedirector/sql/ccm-themedirector/upgrade/postgres-6.6.2-6.6.3.sql b/ccm-themedirector/sql/ccm-themedirector/upgrade/postgres-6.6.2-6.6.3.sql index 1bf22f14b..22544fff8 100644 --- a/ccm-themedirector/sql/ccm-themedirector/upgrade/postgres-6.6.2-6.6.3.sql +++ b/ccm-themedirector/sql/ccm-themedirector/upgrade/postgres-6.6.2-6.6.3.sql @@ -21,6 +21,6 @@ begin; -\i default/6.6.2-6.6.3/set_singleton.sql +\i postgres/6.6.2-6.6.3/set_singleton.sql commit; diff --git a/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.2-6.6.3/set_singleton.sql b/ccm-themedirector/sql/ccm-themedirector/upgrade/postgres/6.6.2-6.6.3/set_singleton.sql similarity index 100% rename from ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.2-6.6.3/set_singleton.sql rename to ccm-themedirector/sql/ccm-themedirector/upgrade/postgres/6.6.2-6.6.3/set_singleton.sql