Revision 5276
Added by Matt Jones over 14 years ago
lib/metacat.properties | ||
---|---|---|
67 | 67 |
database.upgradeVersion.1.9.0=upgrade-db-to-1.9 |
68 | 68 |
database.upgradeVersion.1.9.1=upgrade-db-to-1.9.1 |
69 | 69 |
database.upgradeVersion.1.9.2=upgrade-db-to-1.9.2 |
70 |
database.upgradeVersion.1.10.0=upgrade-db-to-1.10.0 |
|
70 | 71 |
database.initialConnections=5 |
71 | 72 |
database.incrementConnections=5 |
72 | 73 |
database.maximumConnections=200 |
src/xmltables-oracle.sql | ||
---|---|---|
32 | 32 |
DROP SEQUENCE xml_catalog_id_seq; |
33 | 33 |
DROP SEQUENCE xml_relation_id_seq; |
34 | 34 |
DROP SEQUENCE xml_replication_id_seq; |
35 |
DROP SEQUENCE identifier_id_seq; |
|
36 | 35 |
DROP SEQUENCE access_log_id_seq; |
37 | 36 |
DROP SEQUENCE xml_returnfield_id_seq; |
38 | 37 |
DROP SEQUENCE xml_queryresult_id_seq; |
... | ... | |
45 | 44 |
DROP TRIGGER xml_catalog_before_insert; |
46 | 45 |
DROP TRIGGER xml_relation_before_insert; |
47 | 46 |
DROP TRIGGER xml_replication_before_insert; |
48 |
DROP TRIGGER identifier_before_insert; |
|
49 | 47 |
DROP TRIGGER access_log_before_insert; |
50 | 48 |
DROP TRIGGER xml_returnfield_before_insert; |
51 | 49 |
DROP TRIGGER xml_queryresult_before_insert; |
... | ... | |
396 | 394 |
|
397 | 395 |
/* |
398 | 396 |
* Table used to store all document identifiers in metacat. Each identifier |
399 |
* consists of 4 subparts, an authority, namespace, object, and revision as |
|
400 |
* defined in the LSID specification. |
|
397 |
* has a globally unique, unconstrained string, which we will refer to as a |
|
398 |
* GUID, and a local metacat identifier, which consists of the docid |
|
399 |
* and revision fields. Each row maps one global identifier to the local |
|
400 |
* identifier (docid) used within metacat. |
|
401 | 401 |
*/ |
402 |
CREATE SEQUENCE identifier_id_seq; |
|
403 | 402 |
CREATE TABLE identifier ( |
404 |
id NUMBER(20) PRIMARY KEY, -- primary key |
|
405 |
authority VARCHAR2(255), -- the authority issuing the identifier |
|
406 |
namespace VARCHAR2(255), -- the namespace qualifying the identifier |
|
407 |
object VARCHAR2(255), -- the local part of the identifier for a particular object |
|
408 |
revision VARCHAR2(255) -- the revision part of the identifier |
|
403 |
guid VARCHAR2(2000), -- the globally unique string identifier |
|
404 |
docid VARCHAR2(250), -- the local document id # |
|
405 |
rev NUMBER(8) -- the revision part of the local identifier |
|
409 | 406 |
); |
410 |
CREATE TRIGGER identifier_before_insert |
|
411 |
BEFORE INSERT ON identifier FOR EACH ROW |
|
412 |
BEGIN |
|
413 |
SELECT identifier_id_seq.nextval |
|
414 |
INTO :new.id |
|
415 |
FROM dual; |
|
416 |
END; |
|
417 |
/ |
|
418 | 407 |
|
419 | 408 |
/* |
420 | 409 |
* accesssubtree -- table to store access subtree info |
src/upgrade-db-to-1.10.0-postgres.sql | ||
---|---|---|
1 |
DROP TABLE identifier; |
|
2 |
DROP SEQUENCE identifier_id_seq; |
|
3 |
|
|
4 |
CREATE TABLE identifier ( |
|
5 |
guid text, -- the globally unique string identifier |
|
6 |
docid VARCHAR(250), -- the local document id # |
|
7 |
rev INT8, -- the revision part of the local identifier |
|
8 |
CONSTRAINT identifier_pk PRIMARY KEY (guid) |
|
9 |
); |
|
10 |
|
|
11 |
/* |
|
12 |
* update the database version |
|
13 |
*/ |
|
14 |
UPDATE db_version SET status=0; |
|
15 |
|
|
16 |
INSERT INTO db_version (version, status, date_created) |
|
17 |
VALUES ('1.10.0', 1, CURRENT_DATE); |
src/xmltables-postgres.sql | ||
---|---|---|
270 | 270 |
|
271 | 271 |
/* |
272 | 272 |
* Table used to store all document identifiers in metacat. Each identifier |
273 |
* consists of 4 subparts, an authority, namespace, object, and revision as |
|
274 |
* defined in the LSID specification. |
|
273 |
* has a globally unique, unconstrained string, which we will refer to as a |
|
274 |
* GUID, and a local metacat identifier, which consists of the docid |
|
275 |
* and revision fields. Each row maps one global identifier to the local |
|
276 |
* identifier (docid) used within metacat. |
|
275 | 277 |
*/ |
276 |
CREATE SEQUENCE identifier_id_seq; |
|
277 | 278 |
CREATE TABLE identifier ( |
278 |
id INT8 default nextval('identifier_id_seq') PRIMARY KEY, -- primary id |
|
279 |
authority VARCHAR(255), -- the authority issuing the identifier |
|
280 |
namespace VARCHAR(255), -- the namespace qualifying the identifier |
|
281 |
object VARCHAR(255), -- the local part of the identifier for a particular object |
|
282 |
revision VARCHAR(255) -- the revision part of the identifier |
|
279 |
guid text, -- the globally unique string identifier |
|
280 |
docid VARCHAR(250), -- the local document id # |
|
281 |
rev INT8, -- the revision part of the local identifier |
|
282 |
CONSTRAINT identifier_pk PRIMARY KEY (guid) |
|
283 | 283 |
); |
284 | 284 |
|
285 | 285 |
/* |
src/upgrade-db-to-1.10.0-oracle.sql | ||
---|---|---|
1 |
DROP SEQUENCE identifier_id_seq; |
|
2 |
DROP TRIGGER identifier_before_insert; |
|
3 |
DROP TABLE identifier; |
|
4 |
|
|
5 |
/* |
|
6 |
* Table used to store all document identifiers in metacat. Each identifier |
|
7 |
* has a globally unique, unconstrained string, which we will refer to as a |
|
8 |
* GUID, and a local metacat identifier, which consists of the docid |
|
9 |
* and revision fields. Each row maps one global identifier to the local |
|
10 |
* identifier (docid) used within metacat. |
|
11 |
*/ |
|
12 |
CREATE TABLE identifier ( |
|
13 |
guid VARCHAR2(2000), -- the globally unique string identifier |
|
14 |
docid VARCHAR2(250), -- the local document id # |
|
15 |
rev NUMBER(8) -- the revision part of the local identifier |
|
16 |
); |
|
17 |
|
|
18 |
/* |
|
19 |
* update the database version |
|
20 |
*/ |
|
21 |
UPDATE db_version SET status=0; |
|
22 |
|
|
23 |
INSERT INTO db_version (version, status, date_created) |
|
24 |
VALUES ('1.10.0', 1, CURRENT_DATE); |
build.properties | ||
---|---|---|
2 | 2 |
|
3 | 3 |
#Version of this build. This needs to be a dotted numeric version. For |
4 | 4 |
#instance 1.9.1 is okay. 1.9.1_rc1 is not. |
5 |
metacat.version=1.9.2
|
|
5 |
metacat.version=1.10.0
|
|
6 | 6 |
|
7 | 7 |
#This is for packaging purposes. leave it blank for final production release. |
8 | 8 |
metacat.releaseCandidate=-6 |
Also available in: Unified diff
Modified table structure to change identifiers table (previously unused) to
represent a mapping between arbitrary string identifiers and metacat docids.
More information in https://trac.dataone.org/ticket/361. Modifications to
Oracle schemas were made but not tested.