Project

General

Profile

« Previous | Next » 

Revision 2109

Add three new Harvester tables

View differences:

xmltables.sql
57 57
DROP TABLE xml_catalog;
58 58
DROP TABLE accession_number;
59 59
DROP TABLE access_log;
60
DROP TABLE harvest_site_schedule;
61
DROP TABLE harvest_log;
62
DROP TABLE harvest_detail_log;
60 63

  
61 64
/*
62 65
 *Replication -- table to store servers that metacat is replicated to
......
343 346
    INTO :new.entryid
344 347
    FROM dual;
345 348
END;
349

  
350
/* 
351
 * harvest_site_schedule -- table to store harvest sites and schedule info
352
 */
353
CREATE TABLE harvest_site_schedule (
354
  site_schedule_id NUMBER,         -- unique id
355
  documentlisturl  VARCHAR2(255),  -- URL of the site harvest document list
356
  ldapdn           VARCHAR2(255),  -- LDAP distinguished name for site account
357
  datenextharvest  DATE,           -- scheduled date of next harvest
358
  datelastharvest  DATE,           -- recorded date of last harvest
359
  updatefrequency  NUMBER,         -- the harvest update frequency
360
  unit             VARCHAR2(50),   -- update unit -- days weeks or months
361
  contact_email    VARCHAR2(50),   -- email address of the site contact person
362
  ldappwd          VARCHAR2(20),   -- LDAP password for site account
363
  CONSTRAINT harvest_site_schedule_pk PRIMARY KEY (site_schedule_id)
364
);
365

  
366
/* 
367
 * harvest_log -- table to log entries for harvest operations
368
 */
369
CREATE TABLE harvest_log (
370
  harvest_log_id         NUMBER,         -- unique id
371
  harvest_date           DATE,           -- date of the current harvest
372
  status                 NUMBER,         -- non-zero indicates an error status
373
  message                VARCHAR2(1000), -- text message for this log entry
374
  harvest_operation_code VARCHAR2(30),   -- the type of harvest operation
375
  site_schedule_id       NUMBER,         -- foreign key
376
  CONSTRAINT harvest_log_pk PRIMARY KEY (harvest_log_id),
377
  CONSTRAINT harvest_log_site_schedule_id_fk 
378
        FOREIGN KEY (site_schedule_id) REFERENCES harvest_site_schedule
379
);
380

  
381
/* 
382
 * harvest_detail_log -- table to log detailed info about documents that
383
 *                       generated errors during the harvest
384
 */
385
CREATE TABLE harvest_detail_log (
386
  detail_log_id          NUMBER,         -- unique id
387
  harvest_log_id         NUMBER,         -- ponter to the related log entry
388
  scope                  VARCHAR2(50),   -- document scope
389
  identifier             NUMBER,         -- document identifier
390
  revision               NUMBER,         -- document revision
391
  document_url           VARCHAR2(255),  -- document URL
392
  error_message          VARCHAR2(1000), -- text error message
393
  document_type          VARCHAR2(100),  -- document type
394
  CONSTRAINT harvest_detail_log_pk PRIMARY KEY (detail_log_id),
395
  CONSTRAINT harvest_detail_log_harvest_log_id_fk 
396
        FOREIGN KEY (harvest_log_id) REFERENCES harvest_log
397
);
398

  

Also available in: Unified diff