Project

General

Profile

Revision 2769

Added by Matt Jones about 15 years ago

New SQL tables and db upgrade scripts that define a new table stucture for identifiers and delete the previously unused accession_number table. This is in anticipation of supporting LSID identifiers. Currently these tables are unused by the servlet but are in place for discussion.

View differences:

upgrade-db-to-1.6.sql
22 22
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23 23
 */
24 24
 
25
/*
26
 * Changes to the tables for handling identifiers.  Old table no longer needed,
27
 * new identifier table to be used to support LSIDs.
28
 */
29
DROP TABLE accession_number;
30
DROP SEQUENCE accession_number_id_seq;
25 31

  
26 32
/*
33
 * Table used to store all document identifiers in metacat.  Each identifier
34
 * consists of 4 subparts, an authority, namespace, object, and revision as
35
 * defined in the LSID specification.
36
 */
37
CREATE SEQUENCE identifier_id_seq;
38
CREATE TABLE identifier (
39
   id        NUMBER(20) PRIMARY KEY, -- primary key
40
   authority VARCHAR2(255),  -- the authority issuing the identifier
41
   namespace VARCHAR2(255),  -- the namespace qualifying the identifier
42
   object    VARCHAR2(255),  -- the local part of the identifier for a particular object
43
   revision  VARCHAR2(255)   -- the revision part of the identifier
44
);
45
CREATE TRIGGER identifier_before_insert
46
BEFORE INSERT ON identifier FOR EACH ROW
47
BEGIN
48
  SELECT identifier_id_seq.nextval
49
    INTO :new.id
50
    FROM dual;
51
END;
52
/
53

  
54
/*
27 55
 * Index of Paths - table to store nodes with paths specified by userst in metacat.properties
28 56
 */
29 57
CREATE TABLE xml_path_index (

Also available in: Unified diff