Project

General

Profile

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

    
6

    
7
/*
8
 * Add a new column format_id in xml_catalog table
9
 */
10
ALTER TABLE xml_catalog ADD COLUMN format_id VARCHAR(1000);
11
ALTER TABLE xml_catalog DROP CONSTRAINT xml_catalog_uk;
12
ALTER TABLE xml_catalog ADD CONSTRAINT xml_catalog_uk UNIQUE (entry_type, source_doctype, target_doctype, public_id, format_id);
13
/*
14
 * Add the NOAA variant schema with format id into xml_catalog table.
15
 * The formatid indicates it is a variant of the standard schema.
16
 */
17
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id) VALUES ('Schema', 'http://www.isotc211.org/2005/gmd', 'http://www.isotc211.org/2005/gmd-noaa', '/schema/isotc211-noaa/gmd/gmd.xsd'); 
18
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id) VALUES ('Schema', 'http://www.isotc211.org/2005/gco', 'http://www.isotc211.org/2005/gmd-noaa', '/schema/isotc211-noaa/gco/gco.xsd');
19
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id) VALUES ('Schema', 'http://www.isotc211.org/2005/gmi', 'http://www.isotc211.org/2005/gmd-noaa', '/schema/isotc211-noaa/gmi/gmi.xsd');
20
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id) VALUES ('Schema', 'http://www.isotc211.org/2005/gmx', 'http://www.isotc211.org/2005/gmd-noaa', '/schema/isotc211-noaa/gmx/gmx.xsd');
21
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id) VALUES ('Schema', 'http://www.isotc211.org/2005/gsr', 'http://www.isotc211.org/2005/gmd-noaa', '/schema/isotc211-noaa/gsr/gsr.xsd');
22
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id) VALUES ('Schema', 'http://www.isotc211.org/2005/gss', 'http://www.isotc211.org/2005/gmd-noaa', '/schema/isotc211-noaa/gss/gss.xsd');
23
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id) VALUES ('Schema', 'http://www.isotc211.org/2005/gts', 'http://www.isotc211.org/2005/gmd-noaa', '/schema/isotc211-noaa/gts/gts.xsd');
24
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id) VALUES ('Schema', 'http://www.isotc211.org/2005/srv', 'http://www.isotc211.org/2005/gmd-noaa', '/schema/isotc211-noaa/srv/srv.xsd');
25
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id) VALUES ('Schema', 'http://www.w3.org/1999/xlink', 'http://www.isotc211.org/2005/gmd-noaa', '/schema/isotc211-noaa/xlink/xlinks.xsd');
26

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

    
32
INSERT INTO db_version (version, status, date_created) 
33
  VALUES ('2.7.0', 1, CURRENT_DATE);
(98-98/104)