Changeset 8169 for TI01-discovery-Ingest


Ignore:
Timestamp:
15/03/12 12:50:55 (7 years ago)
Author:
sdonegan
Message:

Further debugging to include missing datacentre_dpws_id column in update procedure too

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery-Ingest/trunk/v4.5.0/ingestAutomation-upgrade/database/ingest_procedures_v4.5.0.sql

    r8149 r8169  
    2020$$ LANGUAGE 'plpgsql'; 
    2121 
    22 DROP FUNCTION create_document(filename_in varchar(255), discovery_id_in varchar(255),  
     22DROP FUNCTION create_document(filename_in varchar(255), discovery_id_in varchar(255), datacentre_dpws_id_in text, 
    2323        doc_type_in text, original_document_in text, authors text, parameters text, scope text, dataset_name_in text, datacentre_name_in text, metadata_update_date_in timestamp, dataset_start_date_in timestamp, dataset_end_date_in timestamp) CASCADE; 
    24 CREATE FUNCTION create_document(filename_in varchar(255), discovery_id_in varchar(255),  
     24CREATE FUNCTION create_document(filename_in varchar(255), discovery_id_in varchar(255), datacentre_dpws_id_in text 
    2525        doc_type_in text, original_document_in text, authors text, parameters text, scope text, dataset_name_in text, datacentre_name_in text, metadata_update_date_in timestamp, dataset_start_date_in timestamp, dataset_end_date_in timestamp) RETURNS integer AS  
    2626$$ 
     
    2929    BEGIN 
    3030        -- This inserts a new document into the DB 
    31         INSERT INTO ORIGINAL_DOCUMENT (original_document_id, original_document_filename,  
     31        INSERT INTO ORIGINAL_DOCUMENT (original_document_id, original_document_filename, datacentre_dpws_id, 
    3232            discovery_id, original_format, document_ts_vector, authors_ts_vector,  
    3333            parameters_ts_vector, scope_ts_vector, create_date, harvest_count, scn, dataset_name, datacentre_name, dataset_metadata_update_date, dataset_start_date_nom, dataset_end_date_nom,update_date ) VALUES ( 
    34             DEFAULT, filename_in, discovery_id_in, doc_type_in,  
     34            DEFAULT, filename_in, discovery_id_in, datacentre_dpws_id_in, doc_type_in,  
    3535                        to_tsvector('english', original_document_in), to_tsvector('english', authors),  
    3636                        to_tsvector('english', parameters), to_tsvector('english', scope), current_timestamp, 1, 1, dataset_name_in, datacentre_name_in, metadata_update_date_in, dataset_start_date_in, dataset_end_date_in, current_timestamp); 
     
    6868 
    6969 
    70 DROP FUNCTION update_document(original_document_id_in int, filename_in varchar(255),  
     70DROP FUNCTION update_document(original_document_id_in int, filename_in varchar(255), datacentre_dpws_id_in text, 
    7171        discovery_id_in varchar(255), doc_type_in text, original_document_in text,  
    7272        authors text, parameters text, scope text, scn_in int,dataset_name_in text, datacentre_name_in text, metadata_update_date_in timestamp, dataset_start_date_in timestamp, dataset_end_date_in timestamp) CASCADE; 
    73 CREATE FUNCTION update_document(original_document_id_in int, filename_in varchar(255),  
     73CREATE FUNCTION update_document(original_document_id_in int, filename_in varchar(255), datacentre_dpws_id_in text, 
    7474        discovery_id_in varchar(255), doc_type_in text, original_document_in text,  
    7575        authors text, parameters text, scope text, scn_in int,dataset_name_in text, datacentre_name_in text, metadata_update_date_in timestamp, dataset_start_date_in timestamp, dataset_end_date_in timestamp)  
     
    9393            discovery_id = discovery_id_in, 
    9494                        original_format = doc_type_in, 
     95                        datacentre_dpws_id = datacentre_dpws_id_in, 
    9596            document_ts_vector = to_tsvector('english', original_document_in), 
    9697            authors_ts_vector = to_tsvector('english', authors), 
Note: See TracChangeset for help on using the changeset viewer.