1
|
/*
|
2
|
* Alter the system metadata table to suport seriesId
|
3
|
*/
|
4
|
ALTER TABLE systemMetadata ADD COLUMN series_id text, ADD COLUMN media_type text, ADD COLUMN file_name text;
|
5
|
|
6
|
/*
|
7
|
* 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 text, -- id refer to guid in the system metadata table
|
13
|
name text, -- name of the property
|
14
|
value text, -- value of the property
|
15
|
CONSTRAINT smMediaTypeProperties_fk
|
16
|
FOREIGN KEY (guid) REFERENCES systemMetadata DEFERRABLE
|
17
|
);
|
18
|
|
19
|
/*
|
20
|
* Add an 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
|
* 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);
|