Changeset 7658


Ignore:
Timestamp:
25/10/10 21:55:23 (9 years ago)
Author:
mnagni
Message:

now the foreign key to common_provider generate ON DELETE CASCADE

Location:
TI01-discovery-Ingest/trunk/v4.3.0/ingestAutomation-upgrade/ingestLoggingDatabase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery-Ingest/trunk/v4.3.0/ingestAutomation-upgrade/ingestLoggingDatabase/TimerInfo.sql

    r7655 r7658  
    1717  CONSTRAINT provider_id FOREIGN KEY (common_id) 
    1818      REFERENCES provider_common (id) MATCH SIMPLE 
    19       ON UPDATE NO ACTION ON DELETE NO ACTION 
     19      ON UPDATE NO ACTION ON DELETE CASCADE 
    2020) 
    2121WITH ( 
  • TI01-discovery-Ingest/trunk/v4.3.0/ingestAutomation-upgrade/ingestLoggingDatabase/TimerInfoLog.sql

    r7655 r7658  
    1 -- Table: timer_info_log 
     1-- Table: timer_info 
    22 
    3 -- DROP TABLE timer_info_log; 
     3-- DROP TABLE timer_info; 
    44 
    5 CREATE TABLE timer_info_log 
     5CREATE TABLE timer_info 
    66( 
    77  stop_date timestamp without time zone, 
    88  frequency bigint, 
    99  is_single_action boolean DEFAULT false, 
    10   creation_date timestamp without time zone, 
    11   removed_date timestamp without time zone NOT NULL DEFAULT now(), 
     10  creation_date timestamp without time zone NOT NULL DEFAULT now(), 
    1211  start_date timestamp without time zone NOT NULL DEFAULT now(), 
    1312  id integer NOT NULL, 
    1413  common_id integer NOT NULL, 
    1514  last_req_id integer, 
    16   CONSTRAINT timer_info_log_pkey PRIMARY KEY (id), 
    17   CONSTRAINT timer_info_log_provider_id_fkey FOREIGN KEY (common_id) 
     15  "name" character varying, 
     16  CONSTRAINT "ID" PRIMARY KEY (id), 
     17  CONSTRAINT provider_idkey FOREIGN KEY (common_id) 
    1818      REFERENCES provider_common (id) MATCH SIMPLE 
    19       ON UPDATE NO ACTION ON DELETE NO ACTION 
     19      ON UPDATE NO ACTION ON DELETE CASCADE 
    2020) 
    2121WITH ( 
    2222  OIDS=FALSE 
    2323); 
    24 ALTER TABLE timer_info_log OWNER TO badc; 
     24ALTER TABLE timer_info OWNER TO badc; 
Note: See TracChangeset for help on using the changeset viewer.