File: migrate-oracle-schema-to-1-1-1.sql

package info (click to toggle)
dpm-postgres 1.7.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,788 kB
  • ctags: 10,782
  • sloc: ansic: 146,136; sh: 13,362; perl: 11,142; python: 5,529; cpp: 5,113; sql: 1,790; makefile: 955; fortran: 113
file content (27 lines) | stat: -rw-r--r-- 759 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

--
-- For an Oracle database backend : 
-- script to migrate the schema from the first version to version 1.1.0 
--
-- Author : Sophie Lemaitre <Sophie.Lemaitre@cern.ch>
--


-- Add the "status" and "poolname" fields"

ALTER TABLE Cns_file_replica ADD ( status CHAR(1) );
ALTER TABLE Cns_file_replica ADD ( poolname VARCHAR2(15) );
ALTER TABLE Cns_file_replica ADD ( fs VARCHAR2(79) );
ALTER TABLE Cns_file_replica ADD ( f_type CHAR(1) );

-- Create an index on Cns_file_metadata(PARENT_FILEID)

create index PARENT_FILEID_IDX on Cns_file_metadata(PARENT_FILEID);

-- Create the "schema_version" table

DROP TABLE schema_version;
CREATE TABLE schema_version (major NUMBER(1), minor NUMBER(1), patch NUMBER(1));
INSERT INTO schema_version VALUES (1, 1, 1);