Project

General

Profile

« Previous | Next » 

Revision 9483

Added by Jing Tao over 8 years ago

Add a policy_id in the smReplicationPolicy table to help preserver the order of the nodes list.

View differences:

upgrade-db-to-2.6.0-oracle.sql
1

  
1 2
/*
3
 * Add a new column policy_id in the smReplicationPolicy table
4
 */
5
CREATE SEQUENCE policy_id_seq;
6
ALTER TABLE smReplicationPolicy ADD policy_id number(20);
7
CREATE TRIGGER smReplicationPolicy_before_insert
8
BEFORE INSERT ON smReplicationPolicy FOR EACH ROW
9
BEGIN
10
  SELECT policy_id_seq.nextval
11
    INTO :new.policy_id
12
    FROM dual;
13
END;
14
/
15
UPDATE smReplicationPolicy SET policy_id=policy_id_seq.nextval;
16

  
17
/*
2 18
 * update the database version
3 19
 */
4 20
UPDATE db_version SET status=0;

Also available in: Unified diff