Project

General

Profile

1
/*
2
 * db_version -- table to store the version history of this database
3
 */
4
CREATE TABLE db_version (
5
  db_version_id   NUMBER(20),       -- the identifier for the version
6
  version         VARCHAR(250),     -- the version number
7
  status          NUMBER(20),       -- status of the version
8
  date_created    DATE,             -- the datetime on which the version was created
9
  CONSTRAINT db_version_pk PRIMARY KEY (db_version_id)
10
);
11

    
12
CREATE SEQUENCE db_version_id_seq;
13
CREATE TRIGGER db_version_before_insert
14
BEFORE INSERT ON db_version FOR EACH ROW
15
BEGIN
16
  SELECT db_version_id_seq.nextval
17
    INTO :new.db_version_id
18
    FROM dual;
19
END;
20
/
21

    
22
INSERT INTO db_version (version, status, date_created) 
23
  VALUES ('1.9.0', 1, CURRENT_DATE);
24

    
25
INSERT INTO xml_catalog (entry_type, public_id, system_id)
26
  VALUES ('Schema', '@eml2_1_0namespace@', '/schema/eml-2.1.0/eml.xsd');
27
  
28
INSERT INTO xml_catalog (entry_type, public_id, system_id)
29
  VALUES ('Schema', 'http://ecoinformatics.org/registryentry-1.0.0', '/schema/RegistryService/RegistryEntryType.xsd');
(42-42/77)