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
|
/*
|
18
|
* update the database version
|
19
|
*/
|
20
|
UPDATE db_version SET status=0;
|
21
|
|
22
|
INSERT INTO db_version (version, status, date_created)
|
23
|
VALUES ('2.6.0', 1, CURRENT_DATE);
|