Revision 2109
Added by Duane Costa over 20 years ago
upgrade-db-to-1.4_postgres.sql | ||
---|---|---|
35 | 35 |
date_logged TIMESTAMP, -- the datetime on which the event occurred |
36 | 36 |
CONSTRAINT access_log_pk PRIMARY KEY (entryid) |
37 | 37 |
); |
38 |
|
|
39 |
/* |
|
40 |
* harvest_site_schedule -- table to store harvest sites and schedule info |
|
41 |
*/ |
|
42 |
CREATE TABLE harvest_site_schedule ( |
|
43 |
site_schedule_id INT8, -- unique id |
|
44 |
documentlisturl VARCHAR(255), -- URL of the site harvest document list |
|
45 |
ldapdn VARCHAR(255), -- LDAP distinguished name for site account |
|
46 |
datenextharvest DATE, -- scheduled date of next harvest |
|
47 |
datelastharvest DATE, -- recorded date of last harvest |
|
48 |
updatefrequency INT8, -- the harvest update frequency |
|
49 |
unit VARCHAR(50), -- update unit -- days weeks or months |
|
50 |
contact_email VARCHAR(50), -- email address of the site contact person |
|
51 |
ldappwd VARCHAR(20), -- LDAP password for site account |
|
52 |
CONSTRAINT harvest_site_schedule_pk PRIMARY KEY (site_schedule_id) |
|
53 |
); |
|
54 |
|
|
55 |
/* |
|
56 |
* harvest_log -- table to log entries for harvest operations |
|
57 |
*/ |
|
58 |
CREATE TABLE harvest_log ( |
|
59 |
harvest_log_id INT8, -- unique id |
|
60 |
harvest_date DATE, -- date of the current harvest |
|
61 |
status INT8, -- non-zero indicates an error status |
|
62 |
message VARCHAR(1000), -- text message for this log entry |
|
63 |
harvest_operation_code VARCHAR(30), -- the type of harvest operation |
|
64 |
site_schedule_id INT8, -- foreign key |
|
65 |
CONSTRAINT harvest_log_pk PRIMARY KEY (harvest_log_id), |
|
66 |
CONSTRAINT harvest_log_site_schedule_id_fk |
|
67 |
FOREIGN KEY (site_schedule_id) REFERENCES harvest_site_schedule |
|
68 |
); |
|
69 |
|
|
70 |
/* |
|
71 |
* harvest_detail_log -- table to log detailed info about documents that |
|
72 |
* generated errors during the harvest |
|
73 |
*/ |
|
74 |
CREATE TABLE harvest_detail_log ( |
|
75 |
detail_log_id INT8, -- unique id |
|
76 |
harvest_log_id INT8, -- ponter to the related log entry |
|
77 |
scope VARCHAR(50), -- document scope |
|
78 |
identifier INT8, -- document identifier |
|
79 |
revision INT8, -- document revision |
|
80 |
document_url VARCHAR(255), -- document URL |
|
81 |
error_message VARCHAR(1000), -- text error message |
|
82 |
document_type VARCHAR(100), -- document type |
|
83 |
CONSTRAINT harvest_detail_log_pk PRIMARY KEY (detail_log_id), |
|
84 |
CONSTRAINT harvest_detail_log_harvest_log_id_fk |
|
85 |
FOREIGN KEY (harvest_log_id) REFERENCES harvest_log |
|
86 |
); |
|
87 |
|
Also available in: Unified diff
Add three new Harvester tables