Revision 2109
Added by Duane Costa about 20 years ago
xmltables_postgres.sql | ||
---|---|---|
53 | 53 |
DROP TABLE xml_catalog; |
54 | 54 |
DROP TABLE accession_number; |
55 | 55 |
DROP TABLE access_log; |
56 |
DROP TABLE harvest_site_schedule; |
|
57 |
DROP TABLE harvest_log; |
|
58 |
DROP TABLE harvest_detail_log; |
|
56 | 59 |
|
57 | 60 |
/* |
58 | 61 |
*Replication -- table to store servers that metacat is replicated to |
... | ... | |
282 | 285 |
date_logged TIMESTAMP, -- the datetime on which the event occurred |
283 | 286 |
CONSTRAINT access_log_pk PRIMARY KEY (entryid) |
284 | 287 |
); |
288 |
|
|
289 |
/* |
|
290 |
* harvest_site_schedule -- table to store harvest sites and schedule info |
|
291 |
*/ |
|
292 |
CREATE TABLE harvest_site_schedule ( |
|
293 |
site_schedule_id INT8, -- unique id |
|
294 |
documentlisturl VARCHAR(255), -- URL of the site harvest document list |
|
295 |
ldapdn VARCHAR(255), -- LDAP distinguished name for site account |
|
296 |
datenextharvest DATE, -- scheduled date of next harvest |
|
297 |
datelastharvest DATE, -- recorded date of last harvest |
|
298 |
updatefrequency INT8, -- the harvest update frequency |
|
299 |
unit VARCHAR(50), -- update unit -- days weeks or months |
|
300 |
contact_email VARCHAR(50), -- email address of the site contact person |
|
301 |
ldappwd VARCHAR(20), -- LDAP password for site account |
|
302 |
CONSTRAINT harvest_site_schedule_pk PRIMARY KEY (site_schedule_id) |
|
303 |
); |
|
304 |
|
|
305 |
/* |
|
306 |
* harvest_log -- table to log entries for harvest operations |
|
307 |
*/ |
|
308 |
CREATE TABLE harvest_log ( |
|
309 |
harvest_log_id INT8, -- unique id |
|
310 |
harvest_date DATE, -- date of the current harvest |
|
311 |
status INT8, -- non-zero indicates an error status |
|
312 |
message VARCHAR(1000), -- text message for this log entry |
|
313 |
harvest_operation_code VARCHAR(30), -- the type of harvest operation |
|
314 |
site_schedule_id INT8, -- foreign key |
|
315 |
CONSTRAINT harvest_log_pk PRIMARY KEY (harvest_log_id), |
|
316 |
CONSTRAINT harvest_log_site_schedule_id_fk |
|
317 |
FOREIGN KEY (site_schedule_id) REFERENCES harvest_site_schedule |
|
318 |
); |
|
319 |
|
|
320 |
/* |
|
321 |
* harvest_detail_log -- table to log detailed info about documents that |
|
322 |
* generated errors during the harvest |
|
323 |
*/ |
|
324 |
CREATE TABLE harvest_detail_log ( |
|
325 |
detail_log_id INT8, -- unique id |
|
326 |
harvest_log_id INT8, -- ponter to the related log entry |
|
327 |
scope VARCHAR(50), -- document scope |
|
328 |
identifier INT8, -- document identifier |
|
329 |
revision INT8, -- document revision |
|
330 |
document_url VARCHAR(255), -- document URL |
|
331 |
error_message VARCHAR(1000), -- text error message |
|
332 |
document_type VARCHAR(100), -- document type |
|
333 |
CONSTRAINT harvest_detail_log_pk PRIMARY KEY (detail_log_id), |
|
334 |
CONSTRAINT harvest_detail_log_harvest_log_id_fk |
|
335 |
FOREIGN KEY (harvest_log_id) REFERENCES harvest_log |
|
336 |
); |
|
337 |
|
Also available in: Unified diff
Add three new Harvester tables