Project

General

Profile

1 10460 tao
/*
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
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id)
7
    SELECT 'Schema', 'http://www.isotc211.org/2005/gmd', 'http://www.isotc211.org/2005/gmd-pangaea', '/schema/isotc211-pangaea/gmd.xsd' WHERE NOT EXISTS (SELECT * FROM xml_catalog WHERE format_id='http://www.isotc211.org/2005/gmd-pangaea' AND public_id='http://www.isotc211.org/2005/gmd');
8
9
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id)
10
    SELECT 'Schema', 'http://www.isotc211.org/2005/gss', 'http://www.isotc211.org/2005/gmd-pangaea', '/schema/isotc211-pangaea/gss.xsd' WHERE NOT EXISTS (SELECT * FROM xml_catalog WHERE format_id='http://www.isotc211.org/2005/gmd-pangaea' AND public_id='http://www.isotc211.org/2005/gss');
11
12
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id)
13
    SELECT 'Schema', 'http://www.isotc211.org/2005/gsr', 'http://www.isotc211.org/2005/gmd-pangaea', '/schema/isotc211-pangaea/gsr.xsd' WHERE NOT EXISTS (SELECT * FROM xml_catalog WHERE format_id='http://www.isotc211.org/2005/gmd-pangaea' AND public_id='http://www.isotc211.org/2005/gsr');
14
15
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id)
16
    SELECT 'Schema', 'http://www.isotc211.org/2005/gts', 'http://www.isotc211.org/2005/gmd-pangaea', '/schema/isotc211-pangaea/gts.xsd' WHERE NOT EXISTS (SELECT * FROM xml_catalog WHERE format_id='http://www.isotc211.org/2005/gmd-pangaea' AND public_id='http://www.isotc211.org/2005/gts');
17
18
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id)
19
    SELECT 'Schema', 'http://www.isotc211.org/2005/gco', 'http://www.isotc211.org/2005/gmd-pangaea', '/schema/isotc211-pangaea/gco.xsd' WHERE NOT EXISTS (SELECT * FROM xml_catalog WHERE format_id='http://www.isotc211.org/2005/gmd-pangaea' AND public_id='http://www.isotc211.org/2005/gco');
20
21
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id)
22
    SELECT 'Schema', 'http://www.w3.org/1999/xlink', 'http://www.isotc211.org/2005/gmd-pangaea', '/schema/isotc211-pangaea/xlinks.xsd' WHERE NOT EXISTS (SELECT * FROM xml_catalog WHERE format_id='http://www.isotc211.org/2005/gmd-pangaea' AND public_id='http://www.w3.org/1999/xlink');
23
24
INSERT INTO xml_catalog (entry_type, public_id, format_id, system_id)
25
    SELECT 'Schema', 'http://www.opengis.net/gml', 'http://www.isotc211.org/2005/gmd-pangaea', '/schema/isotc211-pangaea/gml.xsd' WHERE NOT EXISTS (SELECT * FROM xml_catalog WHERE format_id='http://www.isotc211.org/2005/gmd-pangaea' AND public_id='http://www.opengis.net/gml');
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.8.6', 1, CURRENT_DATE);