From 72204e67779898caebcae1d036e833c3f6e099ec Mon Sep 17 00:00:00 2001 From: pb Date: Mon, 15 Nov 2010 09:20:23 +0000 Subject: [PATCH] Update script fuer ccm-ldn-navigation. git-svn-id: https://svn.libreccm.org/ccm/trunk@604 8810af33-2d31-482b-a856-94f89814c4df --- ccm-ldn-navigation/application.xml | 2 +- .../upgrade/6.6.0-6.6.1/upd_acs_objects.sql | 31 +++++++++ .../6.6.0-6.6.1/upd_application_tables.sql | 32 ++++++++++ .../6.6.0-6.6.1/upd_nav_tree_portlet.sql | 63 +++++++++++++++++++ .../upgrade/6.6.0-6.6.1/upd_acs_objects.sql | 31 +++++++++ .../6.6.0-6.6.1/upd_application_tables.sql | 32 ++++++++++ .../6.6.0-6.6.1/upd_nav_tree_portlet.sql | 49 +++++++++++++++ .../upgrade/oracle-se-6.6.0-6.6.1.sql | 28 +++++++++ .../upgrade/postgres-6.6.0-6.6.1.sql | 31 +++++++++ .../src/ccm-ldn-navigation.upgrade | 3 + 10 files changed, 301 insertions(+), 1 deletion(-) create mode 100644 ccm-ldn-navigation/sql/ccm-ldn-navigation/oracle-se/upgrade/6.6.0-6.6.1/upd_acs_objects.sql create mode 100644 ccm-ldn-navigation/sql/ccm-ldn-navigation/oracle-se/upgrade/6.6.0-6.6.1/upd_application_tables.sql create mode 100644 ccm-ldn-navigation/sql/ccm-ldn-navigation/oracle-se/upgrade/6.6.0-6.6.1/upd_nav_tree_portlet.sql create mode 100644 ccm-ldn-navigation/sql/ccm-ldn-navigation/postgres/upgrade/6.6.0-6.6.1/upd_acs_objects.sql create mode 100644 ccm-ldn-navigation/sql/ccm-ldn-navigation/postgres/upgrade/6.6.0-6.6.1/upd_application_tables.sql create mode 100644 ccm-ldn-navigation/sql/ccm-ldn-navigation/postgres/upgrade/6.6.0-6.6.1/upd_nav_tree_portlet.sql create mode 100644 ccm-ldn-navigation/sql/ccm-ldn-navigation/upgrade/oracle-se-6.6.0-6.6.1.sql create mode 100644 ccm-ldn-navigation/sql/ccm-ldn-navigation/upgrade/postgres-6.6.0-6.6.1.sql diff --git a/ccm-ldn-navigation/application.xml b/ccm-ldn-navigation/application.xml index 80c92066a..8a2747762 100755 --- a/ccm-ldn-navigation/application.xml +++ b/ccm-ldn-navigation/application.xml @@ -2,7 +2,7 @@ diff --git a/ccm-ldn-navigation/sql/ccm-ldn-navigation/oracle-se/upgrade/6.6.0-6.6.1/upd_acs_objects.sql b/ccm-ldn-navigation/sql/ccm-ldn-navigation/oracle-se/upgrade/6.6.0-6.6.1/upd_acs_objects.sql new file mode 100644 index 000000000..8b10b8af4 --- /dev/null +++ b/ccm-ldn-navigation/sql/ccm-ldn-navigation/oracle-se/upgrade/6.6.0-6.6.1/upd_acs_objects.sql @@ -0,0 +1,31 @@ +-- +-- Copyright (C) 2010 Peter Boy. 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: upd_nav_tree_portlet.sql $ + +-- NavigationTreePortlet has been moved from ccm-ldn-portal (where it existed as +-- NavigationDirectoryPortlet) to ccm-ldn-navigation because it depends on +-- navigation and was misplaced there (generating horizontal dependencies). + + +update acs_objects + set (object_type,display_name,default_domain_class) = + ('com.arsdigita.london.navigation.portlet.NavigationTreePortlet', + 'Navigation Tree', + 'com.arsdigita.london.navigation.portlet.NavigationTreePortlet') + where object_type + like 'com.arsdigita.london.portal.portlet.NavigationDirectoryPortlet' ; diff --git a/ccm-ldn-navigation/sql/ccm-ldn-navigation/oracle-se/upgrade/6.6.0-6.6.1/upd_application_tables.sql b/ccm-ldn-navigation/sql/ccm-ldn-navigation/oracle-se/upgrade/6.6.0-6.6.1/upd_application_tables.sql new file mode 100644 index 000000000..173a30743 --- /dev/null +++ b/ccm-ldn-navigation/sql/ccm-ldn-navigation/oracle-se/upgrade/6.6.0-6.6.1/upd_application_tables.sql @@ -0,0 +1,32 @@ +-- +-- Copyright (C) 2010 Peter Boy. 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: upd_application_tables.sql $ + +-- NavigationTreePortlet has been moved from ccm-ldn-portal (where it existed as +-- NavigationDirectoryPortlet) to ccm-ldn-navigation because it depends on +-- navigation and was misplaced there (generating horizontal dependencies). + + +update application_types + set (object_type,title,description) = + ('com.arsdigita.london.navigation.portlet.NavigationTreePortlet', + 'Navigation Tree', + 'Displays a tree of navigation categories' ) + where object_type + like 'com.arsdigita.london.portal.portlet.NavigationDirectoryPortlet' ; + diff --git a/ccm-ldn-navigation/sql/ccm-ldn-navigation/oracle-se/upgrade/6.6.0-6.6.1/upd_nav_tree_portlet.sql b/ccm-ldn-navigation/sql/ccm-ldn-navigation/oracle-se/upgrade/6.6.0-6.6.1/upd_nav_tree_portlet.sql new file mode 100644 index 000000000..6b784b955 --- /dev/null +++ b/ccm-ldn-navigation/sql/ccm-ldn-navigation/oracle-se/upgrade/6.6.0-6.6.1/upd_nav_tree_portlet.sql @@ -0,0 +1,63 @@ +-- +-- Copyright (C) 2010 Peter Boy. 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: upd_nav_tree_portlet.sql $ + +-- NavigationTreePortlet has been moved from ccm-ldn-portal (where it existed as +-- NavigationDirectoryPortlet) to ccm-ldn-navigation because it depends on +-- navigation and was misplaced there (generating horizontal dependencies). + + +alter table portlet_navigation_directory + drop constraint port_navig_dire_por_id_p_n4lfs; + +alter table portlet_navigation_directory + drop constraint port_navi_dir_navig_id_f_rq14k; + +alter table portlet_navigation_directory + drop constraint port_navig_dire_por_id_f_vsyyc; + + +alter table portlet_navigation_directory + rename to portlet_navigation_tree; + + +alter table only portlet_navigation_tree + add constraint port_naviga_tre_por_id_p_ivbko PRIMARY KEY (portlet_id); + +alter table portlet_navigation_tree + add constraint port_navi_tre_navig_id_f_b30fa FOREIGN KEY (navigation_id) + REFERENCES nav_app(application_id); + +alter table portlet_navigation_tree + add constraint port_naviga_tre_por_id_f_wgp6z FOREIGN KEY (portlet_id) + REFERENCES portlets(portlet_id); + +update application_types + set object_type = 'com.arsdigita.london.navigation.portlet.NavigationTreePortlet' + where object_type + like 'com.arsdigita.london.portal.portlet.NavigationDirectoryPortlet' ; + +update application_types + set title = 'Navigation Tree' + where object_type + like 'com.arsdigita.london.navigation.portlet.NavigationTreePortlet' ; + +update application_types + set description = 'Displays a tree of navigation categories' + where object_type + like 'com.arsdigita.london.navigation.portlet.NavigationTreePortlet' ; \ No newline at end of file diff --git a/ccm-ldn-navigation/sql/ccm-ldn-navigation/postgres/upgrade/6.6.0-6.6.1/upd_acs_objects.sql b/ccm-ldn-navigation/sql/ccm-ldn-navigation/postgres/upgrade/6.6.0-6.6.1/upd_acs_objects.sql new file mode 100644 index 000000000..70699c706 --- /dev/null +++ b/ccm-ldn-navigation/sql/ccm-ldn-navigation/postgres/upgrade/6.6.0-6.6.1/upd_acs_objects.sql @@ -0,0 +1,31 @@ +-- +-- Copyright (C) 2010 Peter Boy. 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: upd_nav_tree_portlet.sql $ + +-- NavigationTreePortlet has been moved from ccm-ldn-portal (where it existed as +-- NavigationDirectoryPortlet) to ccm-ldn-navigation because it depends on +-- navigation and was misplaced there (generating horizontal dependencies). + + +update acs_objects + set (object_type,display_name,default_domain_class) = + ('com.arsdigita.london.navigation.portlet.NavigationTreePortlet', + 'Navigation Tree', + 'com.arsdigita.london.navigation.portlet.NavigationTreePortlet') + where object_type + like 'com.arsdigita.london.portal.portlet.NavigationDirectoryPortlet' ; \ No newline at end of file diff --git a/ccm-ldn-navigation/sql/ccm-ldn-navigation/postgres/upgrade/6.6.0-6.6.1/upd_application_tables.sql b/ccm-ldn-navigation/sql/ccm-ldn-navigation/postgres/upgrade/6.6.0-6.6.1/upd_application_tables.sql new file mode 100644 index 000000000..173a30743 --- /dev/null +++ b/ccm-ldn-navigation/sql/ccm-ldn-navigation/postgres/upgrade/6.6.0-6.6.1/upd_application_tables.sql @@ -0,0 +1,32 @@ +-- +-- Copyright (C) 2010 Peter Boy. 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: upd_application_tables.sql $ + +-- NavigationTreePortlet has been moved from ccm-ldn-portal (where it existed as +-- NavigationDirectoryPortlet) to ccm-ldn-navigation because it depends on +-- navigation and was misplaced there (generating horizontal dependencies). + + +update application_types + set (object_type,title,description) = + ('com.arsdigita.london.navigation.portlet.NavigationTreePortlet', + 'Navigation Tree', + 'Displays a tree of navigation categories' ) + where object_type + like 'com.arsdigita.london.portal.portlet.NavigationDirectoryPortlet' ; + diff --git a/ccm-ldn-navigation/sql/ccm-ldn-navigation/postgres/upgrade/6.6.0-6.6.1/upd_nav_tree_portlet.sql b/ccm-ldn-navigation/sql/ccm-ldn-navigation/postgres/upgrade/6.6.0-6.6.1/upd_nav_tree_portlet.sql new file mode 100644 index 000000000..e3ddb09b1 --- /dev/null +++ b/ccm-ldn-navigation/sql/ccm-ldn-navigation/postgres/upgrade/6.6.0-6.6.1/upd_nav_tree_portlet.sql @@ -0,0 +1,49 @@ +-- +-- Copyright (C) 2010 Peter Boy. 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: upd_nav_tree_portlet.sql $ + +-- NavigationTreePortlet has been moved from ccm-ldn-portal (where it existed as +-- NavigationDirectoryPortlet) to ccm-ldn-navigation because it depends on +-- navigation and was misplaced there (generating horizontal dependencies). + + +alter table portlet_navigation_directory + drop constraint port_navig_dire_por_id_p_n4lfs; + +alter table portlet_navigation_directory + drop constraint port_navi_dir_navig_id_f_rq14k; + +alter table portlet_navigation_directory + drop constraint port_navig_dire_por_id_f_vsyyc; + + +alter table portlet_navigation_directory + rename to portlet_navigation_tree; + + +alter table only portlet_navigation_tree + add constraint port_naviga_tre_por_id_p_ivbko PRIMARY KEY (portlet_id); + +alter table portlet_navigation_tree + add constraint port_navi_tre_navig_id_f_b30fa FOREIGN KEY (navigation_id) + REFERENCES nav_app(application_id); + +alter table portlet_navigation_tree + add constraint port_naviga_tre_por_id_f_wgp6z FOREIGN KEY (portlet_id) + REFERENCES portlets(portlet_id); + diff --git a/ccm-ldn-navigation/sql/ccm-ldn-navigation/upgrade/oracle-se-6.6.0-6.6.1.sql b/ccm-ldn-navigation/sql/ccm-ldn-navigation/upgrade/oracle-se-6.6.0-6.6.1.sql new file mode 100644 index 000000000..ec389364b --- /dev/null +++ b/ccm-ldn-navigation/sql/ccm-ldn-navigation/upgrade/oracle-se-6.6.0-6.6.1.sql @@ -0,0 +1,28 @@ +-- +-- Copyright (C) 2010 Peter Boy. 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: oracle-se--6.6.0-6.6.1.sql $ + +-- NavigationTreePortlet has been moved from ccm-ldn-portal (where it existed as +-- NavigationDirectoryPortlet) to ccm-ldn-navigation because it depends on +-- navigation and was misplaced there (generating horizontal dependencies). + + + +@@ ../oracle-se/upgrade/6.6.0-6.6.1/upd_nav_tree_portlet.sql +@@ ../oracle-se/upgrade/6.6.0-6.6.1/upd_acs_objects.sql +@@ ../oracle-se/upgrade/6.6.0-6.6.1/upd_application_tables.sql diff --git a/ccm-ldn-navigation/sql/ccm-ldn-navigation/upgrade/postgres-6.6.0-6.6.1.sql b/ccm-ldn-navigation/sql/ccm-ldn-navigation/upgrade/postgres-6.6.0-6.6.1.sql new file mode 100644 index 000000000..c658053f9 --- /dev/null +++ b/ccm-ldn-navigation/sql/ccm-ldn-navigation/upgrade/postgres-6.6.0-6.6.1.sql @@ -0,0 +1,31 @@ +-- +-- Copyright (C) 2010 Peter Boy. 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: postgres-6.6.0-6.6.1.sql $ + +-- NavigationTreePortlet has been moved from ccm-ldn-portal (where it existed as +-- NavigationDirectoryPortlet) to ccm-ldn-navigation because it depends on +-- navigation and was misplaced there (generating horizontal dependencies). + + +begin; + +\i ../postgres/upgrade/6.6.0-6.6.1/upd_nav_tree_portlet.sql +\i ../postgres/upgrade/6.6.0-6.6.1/upd_acs_objects.sql +\i ../postgres/upgrade/6.6.0-6.6.1/upd_application_tables.sql + +commit; diff --git a/ccm-ldn-navigation/src/ccm-ldn-navigation.upgrade b/ccm-ldn-navigation/src/ccm-ldn-navigation.upgrade index 046902282..15e398939 100755 --- a/ccm-ldn-navigation/src/ccm-ldn-navigation.upgrade +++ b/ccm-ldn-navigation/src/ccm-ldn-navigation.upgrade @@ -13,4 +13,7 @@