Project

General

Profile

« Previous | Next » 

Revision 2109

Add three new Harvester tables

View differences:

upgrade-db-to-1.4.sql
44 44
    FROM dual;
45 45
END;
46 46
/
47

  
48
/* 
49
 * harvest_site_schedule -- table to store harvest sites and schedule info
50
 */
51
CREATE TABLE harvest_site_schedule (
52
  site_schedule_id NUMBER,         -- unique id
53
  documentlisturl  VARCHAR2(255),  -- URL of the site harvest document list
54
  ldapdn           VARCHAR2(255),  -- LDAP distinguished name for site account
55
  datenextharvest  DATE,           -- scheduled date of next harvest
56
  datelastharvest  DATE,           -- recorded date of last harvest
57
  updatefrequency  NUMBER,         -- the harvest update frequency
58
  unit             VARCHAR2(50),   -- update unit -- days weeks or months
59
  contact_email    VARCHAR2(50),   -- email address of the site contact person
60
  ldappwd          VARCHAR2(20),   -- LDAP password for site account
61
  CONSTRAINT harvest_site_schedule_pk PRIMARY KEY (site_schedule_id)
62
);
63

  
64
/* 
65
 * harvest_log -- table to log entries for harvest operations
66
 */
67
CREATE TABLE harvest_log (
68
  harvest_log_id         NUMBER,         -- unique id
69
  harvest_date           DATE,           -- date of the current harvest
70
  status                 NUMBER,         -- non-zero indicates an error status
71
  message                VARCHAR2(1000), -- text message for this log entry
72
  harvest_operation_code VARCHAR2(30),   -- the type of harvest operation
73
  site_schedule_id       NUMBER,         -- foreign key
74
  CONSTRAINT harvest_log_pk PRIMARY KEY (harvest_log_id),
75
  CONSTRAINT harvest_log_site_schedule_id_fk 
76
        FOREIGN KEY (site_schedule_id) REFERENCES harvest_site_schedule
77
);
78

  
79
/* 
80
 * harvest_detail_log -- table to log detailed info about documents that
81
 *                       generated errors during the harvest
82
 */
83
CREATE TABLE harvest_detail_log (
84
  detail_log_id          NUMBER,         -- unique id
85
  harvest_log_id         NUMBER,         -- ponter to the related log entry
86
  scope                  VARCHAR2(50),   -- document scope
87
  identifier             NUMBER,         -- document identifier
88
  revision               NUMBER,         -- document revision
89
  document_url           VARCHAR2(255),  -- document URL
90
  error_message          VARCHAR2(1000), -- text error message
91
  document_type          VARCHAR2(100),  -- document type
92
  CONSTRAINT harvest_detail_log_pk PRIMARY KEY (detail_log_id),
93
  CONSTRAINT harvest_detail_log_harvest_log_id_fk 
94
        FOREIGN KEY (harvest_log_id) REFERENCES harvest_log
95
);
96

  

Also available in: Unified diff