metacat/src/upgrade-db-to-2.8.1-postgres.sql @ 10311
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 |
INSERT INTO xml_catalog (entry_type, format_id, no_namespace_schema_location, system_id) SELECT 'NoNamespaceSchema', 'FGDC-STD-001.1-1999', 'https://water.usgs.gov/GIS/metadata/usgswrd/fgdc-std-001-1998.xsd', '/schema/fgdc-bdp/fgdc-std-001.1-1999.xsd' WHERE NOT EXISTS (SELECT * FROM xml_catalog WHERE entry_type='NoNamespaceSchema' AND format_id='FGDC-STD-001.1-1999' AND no_namespace_schema_location='https://water.usgs.gov/GIS/metadata/usgswrd/fgdc-std-001-1998.xsd' AND system_id='/schema/fgdc-bdp/fgdc-std-001.1-1999.xsd'); |
7 |
|
8 |
/*
|
9 |
* update the database version
|
10 |
*/
|
11 |
UPDATE db_version SET status=0; |
12 |
|
13 |
INSERT INTO db_version (version, status, date_created) |
14 |
VALUES ('2.8.1', 1, CURRENT_DATE); |