Project

General

Profile

1

    
2
/*
3
 * Ensure xml_catalog sequence is at table max
4
 */
5
SELECT setval('xml_catalog_id_seq', (SELECT max(catalog_id) from xml_catalog));
6

    
7
/*
8
 * Add a new column no_namespace_schema_location in xml_catalog table
9
 */
10
ALTER TABLE xml_catalog ADD COLUMN no_namespace_schema_location VARCHAR(2000);
11

    
12
/*
13
 * Add a formatid indicates it is a fgdc document without namespace
14
 */
15
INSERT INTO xml_catalog (entry_type, format_id, system_id) VALUES ('Schema', 'FGDC-STD-001-1998', '/schema/fgdc-std-001-1998/fgdc-std-001-1998.xsd');
16

    
17
/*
18
 * Add the columns with the no_namespace_schema_location referring the fgdc documents
19
 */
20
INSERT INTO xml_catalog (entry_type, no_namespace_schema_location, system_id) VALUES ('Schema', 'https://www.fgdc.gov/schemas/metadata/fgdc-std-001-1998.xsd', '/schema/fgdc-std-001-1998/fgdc-std-001-1998.xsd');
21
INSERT INTO xml_catalog (entry_type, no_namespace_schema_location, system_id) VALUES ('Schema', 'http://www.fgdc.gov/schemas/metadata/fgdc-std-001-1998.xsd', '/schema/fgdc-std-001-1998/fgdc-std-001-1998.xsd'); 
22
INSERT INTO xml_catalog (entry_type, no_namespace_schema_location, system_id) VALUES ('Schema', 'https://www.fgdc.gov/metadata/fgdc-std-001-1998.xsd', '/schema/fgdc-std-001-1998/fgdc-std-001-1998.xsd'); 
23
INSERT INTO xml_catalog (entry_type, no_namespace_schema_location, system_id) VALUES ('Schema', 'http://www.fgdc.gov/metadata/fgdc-std-001-1998.xsd', '/schema/fgdc-std-001-1998/fgdc-std-001-1998.xsd');
24

    
25
/*
26
 * update the database version
27
 */
28
UPDATE db_version SET status=0;
29

    
30
INSERT INTO db_version (version, status, date_created) 
31
  VALUES ('2.7.2', 1, CURRENT_DATE);
(100-100/105)