root/sql/tables/stratcon.event_criteria_rulesets.sql

Revision 401af931047409762aea58d455c2896895fdf19c, 1.3 kB (checked in by Robert Treat <robert@omniti.com>, 4 years ago)

revised event management

  • Property mode set to 100644
Line 
1 --
2 -- PostgreSQL database dump
3 --
4
5 SET client_encoding = 'UTF8';
6 SET standard_conforming_strings = off;
7 SET check_function_bodies = false;
8 SET client_min_messages = warning;
9 SET escape_string_warning = off;
10
11 SET search_path = stratcon, pg_catalog;
12
13 SET default_tablespace = '';
14
15 SET default_with_oids = false;
16
17 CREATE TABLE event_criteria_numeric_rulesets (
18   event_criteria_id integer not null primary key references event_criteria_numeric on update cascade on delete restrict,
19   minimum numeric,
20   maximum numeric,
21   absence boolean not null default true,
22   ordering integer not null,
23   priority integer not null,
24   check (coalesce(minimum,maximum,0) <> 0)
25 );
26
27
28 CREATE TABLE event_criteria_text_rulesets (
29   event_criteria_id integer not null primary key references event_criteria_text on update cascade on delete restrict,
30   match text,
31   onchange boolean not null default false,
32   absence boolean not null default true,
33   ordering integer not null,
34   priority integer not null
35 );
36
37
38 GRANT SELECT ON TABLE event_criteria_numeric_rulesets TO prism;
39 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE event_criteria_numeric_rulesets TO stratcon;
40
41 GRANT SELECT ON TABLE event_criteria_text_rulesets TO prism;
42 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE event_criteria_text_rulesets TO stratcon;
43
Note: See TracBrowser for help on using the browser.