Fixed various table and column names to adhere to Oracle restrinctions.

Update for Postgres provided, not tested yet. 
(Micro) version elevated nevertheless.


git-svn-id: https://svn.libreccm.org/ccm/trunk@3013 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2014-12-07 12:48:44 +00:00
parent 1b5095f65a
commit 581fdccd87
7 changed files with 177 additions and 21 deletions

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-cms-publicpersonalprofile"
prettyName="OpenCCM Content Type"
version="6.6.5"
version="6.6.6"
release="1"
webapp="ROOT">
<ccm:dependencies>

View File

@ -1,3 +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$
model com.arsdigita.cms.contenttypes;
import com.arsdigita.kernel.ACSObject;
@ -5,46 +25,46 @@ import com.arsdigita.cms.*;
object type PublicPersonalProfile extends ContentPage {
String[0..1] profileUrl = ct_public_personal_profiles.profile_url VARCHAR(256);
String[0..1] profileUrl = ct_ppp.profile_url VARCHAR(256);
String[0..1] position = ct_public_personal_profiles.position VARCHAR(2048);
String[0..1] interests = ct_public_personal_profiles.interests CLOB;
String[0..1] misc = ct_public_personal_profiles.misc CLOB;
String[0..1] position = ct_ppp.position VARCHAR(2048);
String[0..1] interests = ct_ppp.interests CLOB;
String[0..1] misc = ct_ppp.misc CLOB;
reference key (ct_public_personal_profiles.profile_id);
reference key (ct_ppp.profile_id);
}
object type PublicPersonalProfileBundle extends ContentBundle {
reference key (ct_public_personal_profile_bundles.bundle_id);
reference key (ct_ppp_bundles.bundle_id);
}
association {
PublicPersonalProfileBundle[0..n] profile = join cms_person_bundles.bundle_id
to ct_public_personal_profile_owner_map.owner_id,
join ct_public_personal_profile_owner_map.profile_id
to ct_public_personal_profile_bundles.bundle_id;
to ct_ppp_owner_map.owner_id,
join ct_ppp_owner_map.profile_id
to ct_ppp_bundles.bundle_id;
GenericPersonBundle[0..n] owner = join ct_public_personal_profile_bundles.bundle_id
to ct_public_personal_profile_owner_map.profile_id,
join ct_public_personal_profile_owner_map.owner_id
GenericPersonBundle[0..n] owner = join ct_ppp_bundles.bundle_id
to ct_ppp_owner_map.profile_id,
join ct_ppp_owner_map.owner_id
to cms_person_bundles.bundle_id;
Integer[0..1] ownerOrder = ct_public_personal_profile_owner_map.owner_order INTEGER;
Integer[0..1] ownerOrder = ct_ppp_owner_map.owner_order INTEGER;
}
object type PublicPersonalProfileNavItem {
BigDecimal[1..1] navItemId = ct_public_personal_profile_nav_items.object_id INTEGER;
String[0..1] key = ct_public_personal_profile_nav_items.key VARCHAR(128);
String[0..1] lang = ct_public_personal_profile_nav_items.lang VARCHAR(2);
String[0..1] label = ct_public_personal_profile_nav_items.label VARCHAR(128);
Integer[0..1] navItemOrder = ct_public_personal_profile_nav_items.nav_item_order INTEGER;
String[0..1] generatorClass = ct_public_personal_profile_nav_items.generator_class VARCHAR(1024);
BigDecimal[1..1] navItemId = ct_ppp_nav_items.object_id INTEGER;
String[0..1] key = ct_ppp_nav_items.key VARCHAR(128);
String[0..1] lang = ct_ppp_nav_items.lang VARCHAR(2);
String[0..1] label = ct_ppp_nav_items.label VARCHAR(128);
Integer[0..1] navItemOrder = ct_ppp_nav_items.nav_item_order INTEGER;
String[0..1] generatorClass = ct_ppp_nav_items.generator_class VARCHAR(1024);
unique(key, lang, label);
object key (navItemId);
//reference key ( ct_public_personal_profile_nav_items.id);
//reference key ( ct_ppp_nav_items.id);
}

View File

@ -1,3 +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$
model com.arsdigita.cms.publicpersonalprofile;
import com.arsdigita.web.Application;

View File

@ -0,0 +1,48 @@
--
-- Copyright (C) 2014 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: ren_tables_cms_publicpersonalprofile.sql pboy $
-- Description:
-- Rename tables with names longer than 30 characters to retain Oracle compatibility
-- ct_publicpersonalprofiles_* to ct_ppp_*
-- This update is only applicable for the scientificcms tree up to version 2.2
-- Don't use for the APLAWS tree! APLAWS is update just from 1.0.4 to 2.3.x
-- It corrects various updates
-- * 6.6.0-6.6.1/add_tables_cms_organisation.sql
-- * 6.6.3-6.6.4/create_orgaunit_hierarchy_table.sql
-- * 6.6.4-6.6.5/create_orgaunit_bundle.sql
-- * (6.6.7-6.6.8/add_personsstr_column.sql)
-- Difficult to recreate constraints, leave it as is
-- ALTER TABLE ct_public_personal_profiles
-- DROP CONSTRAINT cms_organiz_organiz_id_p_kk8qt;
ALTER TABLE ct_public_personal_profiles
RENAME TO ct_ppp ;
ALTER TABLE ct_public_personal_profiles_bundles
RENAME TO ct_ppp_bundles ;
ALTER TABLE ct_public_personal_profiles_owner_map
RENAME TO ct_ppp_owner_map ;
ALTER TABLE ct_public_personal_profiles_nav_items
RENAME TO ct_ppp_nav_items ;

View File

@ -0,0 +1,24 @@
--
-- 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: oracle-se-6.6.5-6.6.6.sql pboy $
-- Update: Fixes various identifiers with could be uses in PostgreSQL but not
-- in Oracle. Therefore there is nothing to do here.
PROMPT ScientificCMS PublicPersonalProfile 6.6.5 -> 6.6.6 Upgrade Script (Oracle)
-- Do nothing!

View File

@ -0,0 +1,37 @@
--
-- 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$
-- This update is only applicable for the internal development tree at
-- University of Bremen ! Don't use for the APLAWS main trunk on
-- fedorahosted!
-- Update: Fixes various identifiers with could be uses in PostgreSQL but not
-- in Oracle. Therefore there is no Oracle counterpart.
--
-- This update is only applicable for the scientificcms tree up to 2.2
-- Don't use for the APLAWS tree. APLAWS is updated from 1.0.4
-- directly to 2.3.x (6.6.12)!
\echo LibreCCM PublicPersonalProfile 6.6.4 -> 6.6.5 Upgrade Script (PostgreSQL)
begin;
\i ../postgres/upgrade/6.6.5-6.6.6/fix_app_name.sql
commit;

View File

@ -12,5 +12,12 @@
</version>
<version from="6.6.4" to="6.6.5">
<script sql="ccm-cms-publicpersonalprofile/upgrade/::database::-6.6.4-6.6.5.sql"/>
</version>
<!-- NOTE: Upd 6.6.5-6.6.6 is only applicable to the ScientificCMS tree
prior or equal to ScientificCMS 2.2.x (PPP 6.6.5)!
Don't use it for APLAWS tree which directly updates from version
1.0.4 to 2.3.x (PPP 6.6.6) -->
<version from="6.6.5" to="6.6.6">
<script sql="ccm-cms-publicpersonalprofile/upgrade/::database::-6.6.5-6.6.6.sql"/>
</version>
</upgrade>