Fixed several upgrade scripts to make them compatible with Oracle. Oracle does not understand ALTER TABLE ADD COLUMN, for PostgreSQL the "COLUMN" is optional. Therefore we removed the "COLUMN" from all these statements.
git-svn-id: https://svn.libreccm.org/ccm/trunk@3028 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
316adfb242
commit
f55df351b5
|
|
@ -18,4 +18,4 @@
|
||||||
-- $Id: upd_acs_objects.sql $
|
-- $Id: upd_acs_objects.sql $
|
||||||
|
|
||||||
|
|
||||||
alter table cms_item_image_attachment add column sort_key integer;
|
alter table cms_item_image_attachment add sort_key integer;
|
||||||
|
|
@ -22,13 +22,13 @@
|
||||||
-- fedorahosted!
|
-- fedorahosted!
|
||||||
|
|
||||||
ALTER TABLE ct_public_personal_profiles
|
ALTER TABLE ct_public_personal_profiles
|
||||||
ADD COLUMN position VARCHAR(2048);
|
ADD position VARCHAR(2048);
|
||||||
|
|
||||||
ALTER TABLE ct_public_personal_profiles
|
ALTER TABLE ct_public_personal_profiles
|
||||||
ADD COLUMN interests text;
|
ADD interests text;
|
||||||
|
|
||||||
ALTER TABLE ct_public_personal_profiles
|
ALTER TABLE ct_public_personal_profiles
|
||||||
ADD COLUMN misc text;
|
ADD misc text;
|
||||||
|
|
||||||
ALTER TABLE ct_public_personal_profiles
|
ALTER TABLE ct_public_personal_profiles
|
||||||
DROP COLUMN show_publication_list;
|
DROP COLUMN show_publication_list;
|
||||||
|
|
|
||||||
|
|
@ -15,30 +15,6 @@
|
||||||
--
|
--
|
||||||
-- $Id: upd_table_cms_articles .sql pboy $
|
-- $Id: upd_table_cms_articles .sql pboy $
|
||||||
|
|
||||||
-- alter table cms_articles add column text_id integer ;
|
|
||||||
-- update cms_articles set text_id = (select text_id from cms_text_pages
|
|
||||||
-- where cms_text_pages.item_id = cms_articles.article_id);
|
|
||||||
|
|
||||||
-- alter table cms_articles drop constraint cms_article_article_id_f_ekqk1 ;
|
|
||||||
|
|
||||||
-- alter table cms_articles add constraint cms_article_article_id_f_ekqk1
|
|
||||||
-- FOREIGN KEY (article_id)
|
|
||||||
-- REFERENCES cms_pages (item_id);
|
|
||||||
-- alter table cms_articles add constraint cms_articles_text_id_f_8ah18
|
|
||||||
-- FOREIGN KEY (text_id)
|
|
||||||
-- REFERENCES cms_text (text_id);
|
|
||||||
|
|
||||||
-- alter table ct_events drop constraint ct_events_item_id_f_v7kjv ;
|
|
||||||
|
|
||||||
-- drop table cms_text_pages;
|
|
||||||
|
|
||||||
-- ALTER TABLE ct_events
|
|
||||||
-- ADD CONSTRAINT ct_events_item_id_f_v7kjv FOREIGN KEY (item_id)
|
|
||||||
-- REFERENCES cms_articles(article_id);
|
|
||||||
-- Error msg bei zes-testupd:
|
|
||||||
-- FEHLER: Einfügen oder Aktualisieren in Tabelle »ct_events« verletzt Fremdschlüssel-Constraint »ct_events_item_id_f_v7kjv«
|
|
||||||
-- DETAIL: Schlüssel (item_id)=(520355) ist nicht in Tabelle »cms_articles« vorhanden.
|
|
||||||
|
|
||||||
-- deletes constraints in all tables with references on cms_articles!
|
-- deletes constraints in all tables with references on cms_articles!
|
||||||
drop table cms_articles CASCADE ;
|
drop table cms_articles CASCADE ;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,4 @@
|
||||||
--
|
--
|
||||||
-- $Id: upd_table_cms_publ_links.sql pboy $
|
-- $Id: upd_table_cms_publ_links.sql pboy $
|
||||||
|
|
||||||
alter table cms_published_links
|
alter table cms_published_links add link_attributes bytea;
|
||||||
add column link_attributes bytea;
|
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,4 @@
|
||||||
--
|
--
|
||||||
-- $Id: upd_table_cms_tel_links.sql pboy $
|
-- $Id: upd_table_cms_tel_links.sql pboy $
|
||||||
|
|
||||||
alter table cms_related_links
|
alter table cms_related_links add link_list_name varchar(100);
|
||||||
add column link_list_name varchar(100);
|
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ alter table content_types
|
||||||
drop constraint content_types_is_internal_ck ;
|
drop constraint content_types_is_internal_ck ;
|
||||||
|
|
||||||
alter table content_types
|
alter table content_types
|
||||||
add column ancestors character varying(2000),
|
add ancestors character varying(2000),
|
||||||
add column descendants character varying(2000) ;
|
add descendants character varying(2000) ;
|
||||||
|
|
||||||
|
|
||||||
update content_types
|
update content_types
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,4 @@
|
||||||
-- adds to stacktrace column to the cms_publish_lock table, allowing easier analysis of problems
|
-- adds to stacktrace column to the cms_publish_lock table, allowing easier analysis of problems
|
||||||
-- with the publication process
|
-- with the publication process
|
||||||
|
|
||||||
ALTER TABLE cms_publish_lock ADD COLUMN stacktrace TEXT;
|
ALTER TABLE cms_publish_lock ADD stacktrace TEXT;
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
-- fedorahosted!
|
-- fedorahosted!
|
||||||
|
|
||||||
ALTER TABLE cms_persons
|
ALTER TABLE cms_persons
|
||||||
ADD COLUMN alias_id INTEGER REFERENCES cms_persons;
|
ADD alias_id INTEGER REFERENCES cms_persons;
|
||||||
|
|
||||||
ALTER TABLE cms_persons
|
ALTER TABLE cms_persons
|
||||||
ADD COLUMN dabin_id INTEGER;
|
ADD dabin_id INTEGER;
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,4 @@
|
||||||
|
|
||||||
-- adds to personsstr column (used for filtering organization by their members)
|
-- adds to personsstr column (used for filtering organization by their members)
|
||||||
|
|
||||||
ALTER TABLE cms_orgaunits ADD COLUMN personsstr TEXT;
|
ALTER TABLE cms_orgaunits ADD personsstr TEXT;
|
||||||
|
|
@ -17,5 +17,7 @@
|
||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
|
|
||||||
ALTER TABLE cat_categories ADD COLUMN visible_p CHAR(1);
|
ALTER TABLE cat_categories
|
||||||
|
ADD visible_p CHAR(1);
|
||||||
|
|
||||||
UPDATE cat_categories SET visible_p = 1;
|
UPDATE cat_categories SET visible_p = 1;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
-- Add column for reviewed property to ct_publications table
|
-- Add column for reviewed property to ct_publications table
|
||||||
alter table ct_publications add column reviewed boolean;
|
alter table ct_publications add reviewed boolean;
|
||||||
|
|
||||||
-- Copy existing values for reviewed from
|
-- Copy existing values for reviewed from
|
||||||
-- * ct_article_in_collected_volume
|
-- * ct_article_in_collected_volume
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
-- Add column for authors property in ct_publications table
|
-- Add column for authors property in ct_publications table
|
||||||
alter table ct_publications add column authors varchar(2048);
|
alter table ct_publications add authors varchar(2048);
|
||||||
|
|
||||||
-- Fill the authors property for existing publications
|
-- Fill the authors property for existing publications
|
||||||
update ct_publications set authors = (array_to_string(array(select cms_persons.surname || ', ' || cms_persons.givenname
|
update ct_publications set authors = (array_to_string(array(select cms_persons.surname || ', ' || cms_persons.givenname
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
-- Add columns
|
-- Add columns
|
||||||
alter table ct_internet_article add column url varchar(2048);
|
alter table ct_internet_article add url varchar(2048);
|
||||||
alter table ct_internet_article add column urn varchar(2048);
|
alter table ct_internet_article add urn varchar(2048);
|
||||||
alter table ct_internet_article add column doi varchar(2048);
|
alter table ct_internet_article add doi varchar(2048);
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
-- Add journal symbol column
|
-- Add journal symbol column
|
||||||
ALTER TABLE ct_journal ADD COLUMN symbol VARCHAR(128);
|
ALTER TABLE ct_journal ADD symbol VARCHAR(128);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
-- Add fields for year of first publication and language of the publication
|
-- Add fields for year of first publication and language of the publication
|
||||||
ALTER TABLE ct_publications ADD COLUMN firstPublished INTEGER;
|
ALTER TABLE ct_publications ADD firstPublished INTEGER;
|
||||||
ALTER TABLE ct_publications ADD COLUMN lang VARCHAR(128);
|
ALTER TABLE ct_publications ADD lang VARCHAR(128);
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
ALTER TABLE ct_sci_project_sponsor_map
|
ALTER TABLE ct_sci_project_sponsor_map
|
||||||
ADD COLUMN sponsor_funding_code VARCHAR(512);
|
ADD sponsor_funding_code VARCHAR(512);
|
||||||
Loading…
Reference in New Issue