1 |
8810
|
leinfelder
|
/*
|
2 |
|
|
* Alter the system metadata table to suport seriesId
|
3 |
|
|
*/
|
4 |
9218
|
tao
|
ALTER TABLE systemMetadata ADD (series_id VARCHAR2(2000), media_type VARCHAR2(2000), file_name VARCHAR2(2000));
|
5 |
8810
|
leinfelder
|
|
6 |
|
|
/*
|
7 |
9227
|
tao
|
* Create a table used to store the properties for media types. They are part of the system metadata. But a media type
|
8 |
|
|
* can have multiple properties, we have to store them in a separate table. The guids in this table refer
|
9 |
|
|
* the guids in the systemMetadata.
|
10 |
|
|
*/
|
11 |
|
|
CREATE TABLE smMediaTypeProperties (
|
12 |
|
|
guid VARCHAR2(2000), -- id refer to guid in the system metadata table
|
13 |
|
|
name VARCHAR2(512), -- name of the property
|
14 |
|
|
value VARCHAR2(512), -- value of the property
|
15 |
|
|
CONSTRAINT smMediaTypeProperties_fk
|
16 |
|
|
FOREIGN KEY (guid) REFERENCES systemMetadata DEFERRABLE
|
17 |
|
|
);
|
18 |
|
|
|
19 |
|
|
/*
|
20 |
9211
|
tao
|
* Insert the entry for dataone schema v2.
|
21 |
|
|
*/
|
22 |
|
|
INSERT INTO xml_catalog (entry_type, public_id, system_id)
|
23 |
|
|
VALUES ('Schema', 'http://ns.dataone.org/service/types/v2.0', '/schema/dataone/dataoneTypes_v2.0.xsd');
|
24 |
|
|
/*
|
25 |
8810
|
leinfelder
|
* update the database version
|
26 |
|
|
*/
|
27 |
|
|
UPDATE db_version SET status=0;
|
28 |
|
|
|
29 |
|
|
INSERT INTO db_version (version, status, date_created)
|
30 |
|
|
VALUES ('2.5.0', 1, CURRENT_DATE);
|