tools/oracle/dialog-create.sql
627b3184
 INSERT INTO version (table_name, table_version) values ('dialog','3');
4a81660c
 CREATE TABLE dialog (
     id NUMBER(10) PRIMARY KEY,
     hash_entry NUMBER(10),
     hash_id NUMBER(10),
     callid VARCHAR2(255),
     from_uri VARCHAR2(128),
     from_tag VARCHAR2(64),
     to_uri VARCHAR2(128),
     to_tag VARCHAR2(64),
     caller_cseq VARCHAR2(7),
     callee_cseq VARCHAR2(7),
     caller_route_set VARCHAR2(512),
     callee_route_set VARCHAR2(512),
     caller_contact VARCHAR2(128),
     callee_contact VARCHAR2(128),
     caller_sock VARCHAR2(64),
     callee_sock VARCHAR2(64),
     state NUMBER(10),
     start_time NUMBER(10),
c0f9fd81
     timeout NUMBER(10) DEFAULT 0 NOT NULL,
     sflags NUMBER(10) DEFAULT 0 NOT NULL,
     toroute NUMBER(10) DEFAULT 0 NOT NULL
38fac614
 );
4a81660c
 
 CREATE OR REPLACE TRIGGER dialog_tr
38fac614
 before insert on dialog FOR EACH ROW
 BEGIN
   auto_id(:NEW.id);
 END dialog_tr;
 /
4a81660c
 BEGIN map2users('dialog'); END;
38fac614
 /
4a81660c
 CREATE INDEX dialog_hash_idx  ON dialog (hash_entry, hash_id);