Project

General

Profile

« Previous | Next » 

Revision 9483

Added by Jing Tao over 7 years ago

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

View differences:

xmltables-oracle.sql
442 442
     FOREIGN KEY (guid) REFERENCES systemMetadata DEFERRABLE
443 443
);
444 444

  
445

  
445 446
CREATE TABLE smReplicationPolicy (
447
    policy_id NUMBER(20),
446 448
	guid VARCHAR2(2000),	-- the globally unique string identifier of the object that the system metadata describes
447 449
	member_node VARCHAR(250),	 -- replication member node
448 450
	policy VARCHAR2(2000),	 -- the policy (preferred, blocked, etc...TBD)
......
450 452
		FOREIGN KEY (guid) REFERENCES systemMetadata DEFERRABLE
451 453
);
452 454

  
455
CREATE SEQUENCE policy_id_seq;
456
CREATE TRIGGER smReplicationPolicy_before_insert
457
BEFORE INSERT ON smReplicationPolicy FOR EACH ROW
458
BEGIN
459
  SELECT policy_id_seq.nextval
460
    INTO :new.policy_id
461
    FROM dual;
462
END;
463
/
464

  
453 465
CREATE TABLE smReplicationStatus (
454 466
	guid VARCHAR2(2000),	-- the globally unique string identifier of the object that the system metadata describes
455 467
	member_node VARCHAR(250),	 -- replication member node

Also available in: Unified diff