Changeset 401af931047409762aea58d455c2896895fdf19c

Show
Ignore:
Timestamp:
11/11/09 03:42:32 (4 years ago)
Author:
Robert Treat <robert@omniti.com>
git-committer:
Robert Treat <robert@omniti.com> 1257910952 +0000
git-parent:

[2d6914153aac9275649f48e2e888d3580f6bcdef]

git-author:
Robert Treat <robert@omniti.com> 1257910952 +0000
Message:

revised event management

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sql/tables/stratcon.event_criteria.sql

    rc2dc382 r401af93  
    2525    CACHE 1; 
    2626 
    27 ALTER TABLE event_criteria_id_seq OWNER TO reconnoiter; 
    28 REVOKE ALL ON SEQUENCE event_criteria_id_seq FROM PUBLIC; 
    29 REVOKE ALL ON SEQUENCE event_criteria_id_seq FROM reconnoiter; 
    30 GRANT ALL ON SEQUENCE event_criteria_id_seq TO reconnoiter; 
    3127GRANT SELECT,UPDATE ON SEQUENCE event_criteria_id_seq TO stratcon; 
    3228 
     
    3430  check_id uuid not null, 
    3531  metric_name text not null, 
    36   ordering integer not null, 
    37   event_criteria_id integer not null, 
    38   priority integer not null, 
    39   derive text, 
    40   minimum numeric, 
    41   maximum numeric, 
    42   absence boolean not null default true 
     32  event_criteria_id integer not null primary key, 
     33  derive text 
    4334); 
    4435 
    45 CREATE UNIQUE INDEX event_criteria_numeric_cmo 
    46     ON event_criteria_numeric (check_id, metric_name, ordering); 
    47  
    48 CREATE INDEX event_criteria_numeric_cid 
    49     ON event_criteria_numeric (event_criteria_id); 
     36CREATE INDEX event_criteria_numeric_check_id_idx 
     37    ON event_criteria_numeric (check_id); 
    5038 
    5139CREATE TABLE event_criteria_text ( 
    5240  check_id uuid not null, 
    5341  metric_name text not null, 
    54   ordering integer not null, 
    55   event_criteria_id integer not null, 
    56   priority integer not null, 
    57   match text, 
    58   onchange boolean not null default false, 
    59   absence boolean not null default true 
     42  event_criteria_id integer not null primary key  
    6043); 
    6144 
    62 CREATE UNIQUE INDEX event_criteria_text_cmo 
    63     ON event_criteria_text (check_id, metric_name, ordering); 
     45CREATE INDEX event_criteria_text_check_id_idx 
     46    ON event_criteria_text (check_id); 
    6447 
    65 CREATE UNIQUE INDEX event_criteria_text_cid 
    66     ON event_criteria_text (event_criteria_id); 
    67  
    68 REVOKE ALL ON TABLE event_criteria_numeric FROM PUBLIC; 
    69 REVOKE ALL ON TABLE event_criteria_numeric FROM reconnoiter; 
    70 GRANT ALL ON TABLE event_criteria_numeric TO reconnoiter; 
    71 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE event_criteria_numeric TO prism; 
     48GRANT SELECT ON TABLE event_criteria_numeric TO prism; 
    7249GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE event_criteria_numeric TO stratcon; 
    7350 
    74 REVOKE ALL ON TABLE event_criteria_text FROM PUBLIC; 
    75 REVOKE ALL ON TABLE event_criteria_text FROM reconnoiter; 
    76 GRANT ALL ON TABLE event_criteria_text TO reconnoiter; 
    77 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE event_criteria_text TO prism; 
     51GRANT SELECT ON TABLE event_criteria_text TO prism; 
    7852GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE event_criteria_text TO stratcon; 
    7953