Project

General

Profile

1
/*
2
 * the index_event table for solr-based indexing
3
 */
4
CREATE TABLE index_event (
5
	guid text,
6
	event_action VARCHAR(250),
7
	description text, 
8
	event_date TIMESTAMP
9
);
10

    
11
/*
12
 * Update the "metadata" doctypes to use "FGDC-STD-001-1998" formatId
13
 * now that we have a correct format for them
14
 * 
15
 */
16
UPDATE systemMetadata sm
17
SET object_format = 'FGDC-STD-001-1998'
18
FROM xml_documents xml,
19
identifier id
20
WHERE id.docid = xml.docid
21
AND id.rev = xml.rev
22
AND id.guid = sm.guid
23
AND xml.doctype = 'metadata';
24

    
25
/*
26
 * and in the xml_revisions
27
 */
28
UPDATE systemMetadata sm
29
SET object_format = 'FGDC-STD-001-1998'
30
FROM xml_revisions xml,
31
identifier id
32
WHERE id.docid = xml.docid
33
AND id.rev = xml.rev
34
AND id.guid = sm.guid
35
AND xml.doctype = 'metadata';
36

    
37
/*
38
 * Increase harvest_log column length to avoid errors 
39
 */
40
ALTER TABLE harvest_log ALTER COLUMN harvest_operation_code TYPE VARCHAR(1000);
41

    
42
/*
43
 * update the database version
44
 */
45
UPDATE db_version SET status=0;
46

    
47
INSERT INTO db_version (version, status, date_created) 
48
  VALUES ('2.1.0', 1, CURRENT_DATE);
(73-73/81)