Revision 9227
Added by Jing Tao over 9 years ago
src/upgrade-db-to-2.5.0-oracle.sql | ||
---|---|---|
4 | 4 |
ALTER TABLE systemMetadata ADD (series_id VARCHAR2(2000), media_type VARCHAR2(2000), file_name VARCHAR2(2000)); |
5 | 5 |
|
6 | 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 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 |
/* |
|
7 | 20 |
* Insert the entry for dataone schema v2. |
8 | 21 |
*/ |
9 | 22 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
src/upgrade-db-to-2.5.0-postgres.sql | ||
---|---|---|
4 | 4 |
ALTER TABLE systemMetadata ADD COLUMN series_id text, ADD COLUMN media_type text, ADD COLUMN file_name text; |
5 | 5 |
|
6 | 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 |
/* |
|
7 | 20 |
* Add an entry for dataone schema v2 |
8 | 21 |
*/ |
9 | 22 |
INSERT INTO xml_catalog (entry_type, public_id, system_id) |
Also available in: Unified diff
Add the code to create smMediaTypeProperties table.