Revision 8617
Added by Chris Jones almost 11 years ago
src/upgrade-db-to-2.4.0-oracle.sql | ||
---|---|---|
62 | 62 |
AND sm.obsoleted_by IS NOT null |
63 | 63 |
AND sm.archived = 'true'; |
64 | 64 |
|
65 |
/* Register schemas |
|
66 |
*/ |
|
67 |
DELETE FROM xml_catalog |
|
68 |
WHERE entry_type LIKE 'Schema' |
|
69 |
AND system_id LIKE '%/dataone/%'; |
|
70 |
DELETE FROM xml_catalog |
|
71 |
WHERE entry_type LIKE 'Schema' |
|
72 |
AND system_id LIKE '%/dc/%'; |
|
73 |
DELETE FROM xml_catalog |
|
74 |
WHERE entry_type LIKE 'Schema' |
|
75 |
AND system_id LIKE '%/dwc/%'; |
|
76 |
DELETE FROM xml_catalog |
|
77 |
WHERE entry_type LIKE 'Schema' |
|
78 |
AND system_id LIKE '%/dryad/%'; |
|
79 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
80 |
VALUES ('Schema', 'http://ns.dataone.org/service/types/v1', '/schema/dataone/dataoneTypes.xsd'); |
|
81 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
82 |
VALUES ('Schema', 'http://ns.dataone.org/service/types/v1.1', '/schema/dataone/dataoneTypes_v1.1.xsd'); |
|
83 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
84 |
VALUES ('Schema', 'http://purl.org/dryad/schema/terms/v3.1', '/schema/dryad/dryad.xsd'); |
|
85 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
86 |
VALUES ('Schema', 'http://purl.org/dryad/schema/dryad-bibo/v3.1', '/schema/dryad/dryad-bibo.xsd'); |
|
87 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
88 |
VALUES ('Schema', 'http://purl.org/dc/terms/', '/schema/dc/dcterms.xsd'); |
|
89 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
90 |
VALUES ('Schema', 'http://purl.org/dc/elements/1.1/', '/schema/dc/dc.xsd'); |
|
91 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
92 |
VALUES ('Schema', 'http://purl.org/dc/dcmitype/', '/schema/dc/dcmitype.xsd'); |
|
93 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
94 |
VALUES ('Schema', 'http://rs.tdwg.org/dwc/terms/', '/schema/dwc/tdwg_dwcterms.xsd'); |
|
95 |
|
|
65 | 96 |
/* |
66 | 97 |
* update the database version |
67 | 98 |
*/ |
src/upgrade-db-to-2.4.0-postgres.sql | ||
---|---|---|
182 | 182 |
AND system_id LIKE '%/dc/%'; |
183 | 183 |
DELETE FROM xml_catalog |
184 | 184 |
WHERE entry_type LIKE 'Schema' |
185 |
AND system_id LIKE '%/dwc/%'; |
|
186 |
DELETE FROM xml_catalog |
|
187 |
WHERE entry_type LIKE 'Schema' |
|
185 | 188 |
AND system_id LIKE '%/dryad/%'; |
186 | 189 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
187 | 190 |
VALUES ('Schema', 'http://ns.dataone.org/service/types/v1', '/schema/dataone/dataoneTypes.xsd'); |
... | ... | |
197 | 200 |
VALUES ('Schema', 'http://purl.org/dc/elements/1.1/', '/schema/dc/dc.xsd'); |
198 | 201 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
199 | 202 |
VALUES ('Schema', 'http://purl.org/dc/dcmitype/', '/schema/dc/dcmitype.xsd'); |
203 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
204 |
VALUES ('Schema', 'http://rs.tdwg.org/dwc/terms/', '/schema/dwc/tdwg_dwcterms.xsd'); |
|
200 | 205 |
|
201 | 206 |
/* |
202 | 207 |
* update the database version |
src/loaddtdschema-postgres.sql | ||
---|---|---|
15 | 15 |
AND system_id LIKE '%/dc/%'; |
16 | 16 |
DELETE FROM xml_catalog |
17 | 17 |
WHERE entry_type LIKE 'Schema' |
18 |
AND system_id LIKE '%/dwc/%'; |
|
19 |
DELETE FROM xml_catalog |
|
20 |
WHERE entry_type LIKE 'Schema' |
|
18 | 21 |
AND system_id LIKE '%/dryad/%'; |
19 | 22 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
20 | 23 |
VALUES ('DTD', '-//ecoinformatics.org//eml-access-@eml-version@//EN', |
... | ... | |
116 | 119 |
VALUES ('Schema', 'http://purl.org/dc/elements/1.1/', '/schema/dc/dc.xsd'); |
117 | 120 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
118 | 121 |
VALUES ('Schema', 'http://purl.org/dc/dcmitype/', '/schema/dc/dcmitype.xsd'); |
122 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
123 |
VALUES ('Schema', 'http://rs.tdwg.org/dwc/terms/', '/schema/dwc/tdwg_dwcterms.xsd'); |
|
119 | 124 |
|
120 | 125 |
|
126 |
|
|
121 | 127 |
INSERT INTO db_version (version, status, date_created) |
122 | 128 |
VALUES ('2.4.0',1,CURRENT_DATE); |
src/loaddtdschema-oracle.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 '%/dwc/%'; |
|
19 |
DELETE FROM xml_catalog |
|
20 |
WHERE entry_type LIKE 'Schema' |
|
21 |
AND system_id LIKE '%/dryad/%'; |
|
10 | 22 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
11 | 23 |
VALUES ('DTD', '-//ecoinformatics.org//eml-access-@eml-version@//EN', |
12 | 24 |
'/dtd/eml-access-@eml-version@.dtd'); |
... | ... | |
107 | 119 |
VALUES ('Schema', 'http://purl.org/dc/elements/1.1/', '/schema/dc/dc.xsd'); |
108 | 120 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
109 | 121 |
VALUES ('Schema', 'http://purl.org/dc/dcmitype/', '/schema/dc/dcmitype.xsd'); |
122 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
|
123 |
VALUES ('Schema', 'http://rs.tdwg.org/dwc/terms/', '/schema/dwc/tdwg_dwcterms.xsd'); |
|
110 | 124 |
|
111 | 125 |
INSERT INTO db_version (version, status, date_created) |
112 | 126 |
VALUES ('2.4.0',1,CURRENT_DATE); |
Also available in: Unified diff
Add in Darwin Core schema support into xml_catalog, and insert it on upgrade as well. The schemas are cached in lib/schema/dwc, and Matt and Ben noted that the tdwg_basetypes.xsd and tdwg_dwctypes.xsd are part of the same namespace, but are xs:include'd rather than imported via namespace.