Project

General

Profile

« Previous | Next » 

Revision 4818

Added by daigle over 15 years ago

Add db rollback scripts

View differences:

src/rollback-db-from-1.9-oracle.sql
1
/*
2
 * db_version -- table to store the version history of this database
3
 */
4
CREATE SEQUENCE db_version_id_seq;
5
CREATE TABLE db_version (
6
  db_version_id   INT8 default nextval ('db_version_id_seq'), -- the identifier for the version
7
  version         VARCHAR(250),     -- the version number
8
  status          INT8,             -- status of the version
9
  date_created    TIMESTAMP,        -- the datetime on which the version was created
10
  CONSTRAINT db_version_pk PRIMARY KEY (db_version_id)
11
);
12

  
13
INSERT INTO db_version (version, status, date_created) 
14
  VALUES ('1.9.0', 1, CURRENT_DATE);
15

  
16
INSERT INTO xml_catalog (entry_type, public_id, system_id)
17
  VALUES ('Schema', '@eml2_1_0namespace@', '/schema/eml-2.1.0/eml.xsd');
18
  
19
INSERT INTO xml_catalog (entry_type, public_id, system_id)
20
  VALUES ('Schema', 'http://ecoinformatics.org/registryentry-1.0.0', '/schema/RegistryService/RegistryEntryType.xsd');
0 21

  
src/rollback-db-from-1.9-postgres.sql
1
/*
2
 * drop  db_version -- table to store the version history of this database
3
 */
4
DROP TABLE db_version;
5
DROP SEQUENCE db_version_id_seq;
6

  
7
DELETE FROM xml_catalog
8
WHERE entry_type = 'Schema'
9
  AND public_id = '@eml2_1_0namespace@'
10
  AND system_id = '/schema/eml-2.1.0/eml.xsd';
11
  
12
DELETE FROM xml_catalog
13
WHERE entry_type = 'Schema'
14
  AND public_id = 'http://ecoinformatics.org/registryentry-1.0.0'
15
  AND system_id = '/schema/RegistryService/RegistryEntryType.xsd';
0 16

  
src/upgrade-db-to-1.9-oracle.sql
26 26
  VALUES ('Schema', '@eml2_1_0namespace@', '/schema/eml-2.1.0/eml.xsd');
27 27
  
28 28
INSERT INTO xml_catalog (entry_type, public_id, system_id)
29
  VALUES ('Schema', '/schema/RegistryService/RegistryEntryType.xsd', '/schema/RegistryService/RegistryEntryType.xsd');
29
  VALUES ('Schema', 'http://ecoinformatics.org/registryentry-1.0.0', '/schema/RegistryService/RegistryEntryType.xsd');

Also available in: Unified diff