Project

General

Profile

« Previous | Next » 

Revision 8609

Added by Chris Jones over 10 years ago

Add DataONE, Dublin Core, and Dryad schemas during the 2.4.0 upgrade, and be sure to remove the appropriate entries before inserting to avoid duplicate rows.

View differences:

src/upgrade-db-to-2.4.0-postgres.sql
172 172
DROP TABLE IF EXISTS current_documents;
173 173
DROP TABLE IF EXISTS restore_documents;
174 174

  
175
/* Register schemas
176
*/
177
DELETE FROM xml_catalog 
178
      WHERE entry_type LIKE 'Schema'
179
        AND system_id LIKE '%/dataone/%';
180
DELETE FROM xml_catalog 
181
      WHERE entry_type LIKE 'Schema'
182
        AND system_id LIKE '%/dc/%';
183
DELETE FROM xml_catalog 
184
      WHERE entry_type LIKE 'Schema'
185
        AND system_id LIKE '%/dryad/%';                
186
INSERT INTO xml_catalog (entry_type, public_id, system_id)
187
  VALUES ('Schema', 'http://ns.dataone.org/service/types/v1', '/schema/dataone/dataoneTypes.xsd');
188
INSERT INTO xml_catalog (entry_type, public_id, system_id)
189
  VALUES ('Schema', 'http://ns.dataone.org/service/types/v1.1', '/schema/dataone/dataoneTypes_v1.1.xsd');
190
INSERT INTO xml_catalog (entry_type, public_id, system_id)
191
  VALUES ('Schema', 'http://purl.org/dryad/schema/terms/v3.1', '/schema/dryad/dryad.xsd');
192
INSERT INTO xml_catalog (entry_type, public_id, system_id)
193
  VALUES ('Schema', 'http://purl.org/dryad/schema/dryad-bibo/v3.1', '/schema/dryad/dryad-bibo.xsd');
194
INSERT INTO xml_catalog (entry_type, public_id, system_id)
195
  VALUES ('Schema', 'http://purl.org/dc/terms/', '/schema/dc/dcterms.xsd');
196
INSERT INTO xml_catalog (entry_type, public_id, system_id)
197
  VALUES ('Schema', 'http://purl.org/dc/elements/1.1/', '/schema/dc/dc.xsd');
198
INSERT INTO xml_catalog (entry_type, public_id, system_id)
199
  VALUES ('Schema', 'http://purl.org/dc/dcmitype/', '/schema/dc/dcmitype.xsd');
200

  
175 201
/*
176 202
 * update the database version
177 203
 */
src/loaddtdschema-postgres.sql
7 7
DELETE FROM xml_catalog 
8 8
      WHERE entry_type LIKE 'Schema'
9 9
        AND system_id LIKE '%eml%';
10
DELETE FROM xml_catalog 
11
      WHERE entry_type LIKE 'Schema'
12
        AND system_id LIKE '%/dataone/%';
13
DELETE FROM xml_catalog 
14
      WHERE entry_type LIKE 'Schema'
15
        AND system_id LIKE '%/dc/%';
16
DELETE FROM xml_catalog 
17
      WHERE entry_type LIKE 'Schema'
18
        AND system_id LIKE '%/dryad/%';                
10 19
INSERT INTO xml_catalog (entry_type, public_id, system_id)
11 20
  VALUES ('DTD', '-//ecoinformatics.org//eml-access-@eml-version@//EN',
12 21
         '/dtd/eml-access-@eml-version@.dtd');

Also available in: Unified diff