New columns in the table 'log_adv_daemon_email': size, pri, relay,
[gnucomo.git] / src / database / create.sql
1 --*************************************************************************
2 --  (c) Copyright 2002, De Winter Information Solutions
3 -- This is free software; you can redistribute it and/or modify it under the
4 -- terms of the GNU General Public License, see the file COPYING.
5 --*************************************************************************/
6 --
7 -- Gnucomo database creation script.
8 --
9 --
10 -- This SQL script creates the initial tables for the Gnucomo database.
11 -- Before running this script with 'psql -f', you should have your
12 -- DBA create the database and give access permissions.
13 --
14 --  $Log: create.sql,v $
15 --  Revision 1.13  2003-03-29 08:27:05  arjen
16 --  New columns in the table 'log_adv_daemon_email': size, pri, relay,
17 --  status_details and dsn.
18 --  Added several indices for the table 'log_adv_daemon_email'.
19 --
20 --  Revision 1.12  2003/02/21 08:38:38  arjen
21 --  Added new table to the database: log_adv_daemon_email.
22 --
23 --  Revision 1.11  2003/02/16 08:24:38  arjen
24 --  Added a new entry to the action table: Notification was displayed in the listing
25 --
26 --  Revision 1.10  2003/02/14 06:32:27  arjen
27 --  Setup the groups and database permissions. The three groups
28 --  are: view, ops and admin.
29 --  Added a new entry to the action table.
30 --
31 --  Revision 1.9  2003/02/13 08:46:54  arjen
32 --  Added log, notification and parameter counters to the 'object' table.
33 --  Counting these things at the time a user interface needs them is
34 --  too slow. Other programs, like gcm_daemon en gcm_input should prepare
35 --  these counters for quick retrieval.
36 --
37 --  Revision 1.8  2003/02/08 07:36:41  arjen
38 --  Added new table to the database : log_adv_daemon
39 --
40 --  Revision 1.7  2003/02/05 09:29:08  arjen
41 --  Bug fix: action.statuscode was in upper case.
42 --
43 --  Revision 1.6  2003/01/20 07:29:48  arjen
44 --  Added new tables to the database: parameter_class and parameter_notification
45 --
46 --  Revision 1.5  2003/01/18 08:46:48  arjen
47 --  Added new records to the 'type_of_issue' table.
48 --  Changed semantics of actionid 9 in the 'action' table.
49 --
50 --
51
52 CREATE SEQUENCE "action_actionid_seq";
53
54 CREATE TABLE "action"
55 (
56         "actionid" bigint DEFAULT nextval('"action_actionid_seq"'::text) NOT NULL,
57         "actionname" text,
58         "statuscode" character varying(3),
59         "description" text
60 );
61
62
63 COPY "action" FROM stdin;
64 1       Entry in the system     new     This indicates that a notification has been entered into the system.
65 2       Display to user opn     The notification has been displayed to the user. It doesn't mean that the user actually read the notification, but he/she should be aware. For that reason we consider the notification to be OPEN
66 3       Remarks added   pen     Remarks have been added to the notification.
67 4       Priority changed manually       pen     The priority of the notification has been changed by the user.
68 5       Priority changed automatically  pen     The priority of the notification has been changed by the system. This can be the result of an action by the user or an automatical escalation.
69 6       Action taken    pen     An action has been taken.
70 7       Assignment to user      pen     The notification has been assigned to an user.
71 8       More information or research needed.    inv     The notification is relevant and will be handled, however more information or research will be needed. For that reason the status has been altered to UNDER INVESTIGATION.
72 9       Investigation completed pen     Investigation has been done. Information is available to fix the problem.
73 10      Job output no longer valid      cls     By making a newer job output a valid reference, this data has been obsoleted. Since it was a reference once the output isn't interesting anymore and thus the notification can be closed.
74 11      Action taken - please verify    cls     An action has been taken and things should have been resolved. Before the notification can be closed a verification has to be done. The new status is now VERIFY.
75 12      Action not verified     pen     A check has been done and the results were not good. New verification is needed. The status has been changed back to PEN.
76 13      Action verified cls     A check has been done and the results were approved. The notification has been closed.
77 15      SMS sent        opn     An SMS has been sent.
78 14      E-mail sent     opn     An e-mail has been sent.
79 16      Fax sent        opn     An fax has been sent.
80 17      Log entries shown       \N      The log entries relevant to the notification have been shown.
81 18      Notification closed     cls     The notification has been closed.
82 19      Notification reopend    opn     The notification has been reopend.
83 20      Redisplayed to user     \N      The notification has been presented to a user. This is not the first time
84 21      Displayed in list       \N      The notification has been presented in a list with other notifications.
85 \.
86
87 CREATE UNIQUE INDEX action_actionid_key ON "action" USING btree (actionid);
88
89 CREATE UNIQUE INDEX act_pk ON "action" USING btree (actionid);
90
91 CREATE UNIQUE INDEX act_actionname ON "action" USING btree (actionname);
92
93 CREATE INDEX act_statuscode ON "action" USING btree (statuscode);
94
95 SELECT setval ('"action_actionid_seq"', 19, true);
96
97 --
98 --
99
100 CREATE SEQUENCE "action_user_actionstepid_seq";
101
102 CREATE TABLE "action_user"
103 (
104         "actionstepid" bigint DEFAULT
105             nextval('"action_user_actionstepid_seq"'::text) NOT NULL,
106         "actionid" bigint,
107         "username" text,
108         "notificationid" bigint,
109         "timestamp" timestamp with time zone,
110         "statuscode" character varying(3),
111         "remarks" text
112 );
113
114 CREATE UNIQUE INDEX action_user_actionstepid_key ON action_user USING btree (actionstepid);
115
116 CREATE INDEX anu_actionid ON action_user USING btree (actionid);
117
118 CREATE INDEX anu_username ON action_user USING btree (username);
119
120 CREATE INDEX anu_notificationid ON action_user USING btree (notificationid);
121
122 CREATE INDEX anu_timestamp ON action_user USING btree ("timestamp");
123
124 CREATE INDEX anu_statuscode ON action_user USING btree (statuscode);
125
126 SELECT setval ('"action_user_actionstepid_seq"', 1, false);
127
128 --
129 --
130
131 CREATE TABLE "db_value"
132 (
133         "setting" text,
134         "setting_value" text
135 );
136
137
138 COPY "db_value" FROM stdin;
139 db_version      36
140 gcm_daemon_version      1
141 log_processing  0
142 last_notification       0
143 \.
144
145 --
146 --
147
148 CREATE TABLE "history"
149 (
150    paramid            bigint,
151    modified           timestamp,
152    change_nature      text,       --  CREATED, MODIFIED or REMOVED
153    changed_property   text,
154    new_value          text,
155    remark             text
156
157 );
158
159 --
160 --
161
162 CREATE SEQUENCE "log_logid_seq";
163
164 CREATE TABLE "log"
165 (
166         "logid" bigint DEFAULT nextval('"log_logid_seq"'::text) NOT NULL,
167         "objectid" bigint,
168         "original_filename" text,
169         "servicecode" text,
170         "object_timestamp" timestamp with time zone,
171         "timestamp" timestamp with time zone,
172         "rawdata" text,
173         "processed" boolean DEFAULT false,
174         "recognized" boolean DEFAULT false
175 );
176
177 CREATE UNIQUE INDEX log_logid_key ON log USING btree (logid);
178
179 CREATE INDEX log_objectid ON log USING btree (objectid);
180
181 CREATE INDEX log_original_filename ON log USING btree (original_filename);
182
183 CREATE INDEX log_servicecode ON log USING btree (servicecode);
184
185 CREATE INDEX log_object_timestmap ON log USING btree ("timestamp");
186
187 CREATE INDEX log_timestmap ON log USING btree ("timestamp");
188
189 CREATE INDEX log_timestamp ON log USING btree (object_timestamp);
190
191 CREATE INDEX log_processed ON log USING btree (processed);
192
193 SELECT setval ('"log_logid_seq"', 1, false);
194
195
196 --
197 --
198
199 CREATE SEQUENCE "log_advid_seq";
200
201
202 CREATE TABLE "log_adv"
203 (
204         "log_advid" bigint DEFAULT
205               nextval('"log_advid_seq"'::text) NOT NULL,
206         "logid" bigint NOT NULL,
207         "detailed_table"    text
208 );
209
210
211 CREATE INDEX log_adv_logid ON log_adv USING btree (logid);
212
213 CREATE UNIQUE INDEX log_adv_log_advid ON log_adv USING btree (log_advid);
214
215 SELECT setval ('"log_advid_seq"', 1, false);
216
217 CREATE TABLE log_adv_kernel_network
218 (
219        device_in         text,
220        device_out        text,
221        hw_address        text, 
222        source_ip         INET,
223        destination_ip    INET,
224        packet_length     bigint, 
225        tos_bit           text, 
226        prec_bit          text,
227        ttl               int,
228        header_id         bigint,
229        source_port       int, 
230        destination_port  int,
231        body_length       int,
232        protocol          text, 
233        body_len          int,
234        window            text,
235        urgp              int,
236        syn               boolean DEFAULT false,
237        type              int,
238        code              int,
239        sequence_number   int,
240        res               text,
241        rst               boolean,
242        df                boolean
243 ) INHERITS (log_adv);
244
245 CREATE TABLE log_adv_daemon
246 (
247        service TEXT,
248        event   TEXT
249 ) INHERITS (log_adv);
250
251 CREATE INDEX log_adv_daemon_service ON log_adv_daemon (service);
252
253 CREATE TABLE log_adv_daemon_email
254 (
255      source_ip            INET,
256      destination_ip       INET,
257      internal_messageid   TEXT, 
258      external_messageid   TEXT,
259      to_email             TEXT,
260      from_email           TEXT,
261      delay                TIME,
262      xdelay               TIME,
263      mailer               TEXT,
264      status               TEXT,
265      pid                  INT,
266      size                 INT,
267      pri                  INT,
268      relay                TEXT,
269      status_details       TEXT,
270      dsn                  TEXT
271 ) INHERITS (log_adv_daemon);
272
273 CREATE INDEX log_adv_daemon_email_s_ip ON log_adv_daemon_email (source_ip);
274 CREATE INDEX log_adv_daemon_email_d_ip ON log_adv_daemon_email (destination_ip);
275 CREATE INDEX log_adv_daemon_email_to   ON log_adv_daemon_email (to_email);
276 CREATE INDEX log_adv_daemon_email_from ON log_adv_daemon_email (from_email);
277 CREATE INDEX log_adv_email_status      ON log_adv_daemon_email (status);
278
279
280 /*
281 CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER "plpgsql_call_handler" LANCOMPILER '';
282 CREATE FUNCTION "funct_processlog" () RETURNS opaque AS '
283 -- Initial date: September 18th 2002
284 -- Update: November 13th 2002
285 -- Author: Brenno J.S.A.A.F. de Winter
286 -- Abstract: This routine sets a flag
287 DECLARE
288    var_value    VARCHAR;
289    var_setting  VARCHAR;
290
291 BEGIN
292
293     UPDATE db_value SET setting_value = ''TRUE'' WHERE setting = ''log_flag'';
294     RETURN NULL;
295 END;
296  ' LANGUAGE 'plpgsql';
297
298
299 CREATE TRIGGER "log_insert" AFTER INSERT ON "log"  FOR EACH ROW EXECUTE PROCEDURE "funct_processlog" ();
300 */
301 --
302 --
303
304 CREATE TABLE "log_notification"
305 (
306         "notificationid" bigint,
307         "logid" bigint
308 );
309
310 CREATE UNIQUE INDEX lon_pk ON log_notification USING btree (notificationid, logid);
311
312 CREATE UNIQUE INDEX lon_notificationid ON log_notification USING btree (notificationid);
313
314 CREATE UNIQUE INDEX lon_logid ON log_notification USING btree (logid);
315
316 --
317 --
318
319 CREATE SEQUENCE "notification_notificationid_seq";
320
321 CREATE TABLE "notification"
322 (
323         "notificationid" bigint DEFAULT
324             nextval('"notification_notificationid_seq"'::text) NOT NULL,
325         "objectid" bigint,
326         "type_of_issueid" bigint,
327         "timestamp" timestamp with time zone,
328         "statuscode" character varying(3),
329         "priority" integer,
330         "escalation_count_timestamp" timestamp with time zone,
331         "repeat_notification_timestamp" timestamp with time zone,
332         "securitylevel_view" integer,
333         "securitylevel_add" integer,
334         "securitylevel_close" integer
335 );
336
337 CREATE UNIQUE INDEX notification_notificationid_key ON notification USING btree (notificationid);
338
339 CREATE INDEX not_objectid ON notification USING btree (objectid);
340
341 CREATE INDEX not_type_of_issueid ON notification USING btree (type_of_issueid);
342
343 CREATE INDEX not_timestamp ON notification USING btree ("timestamp");
344
345 CREATE INDEX not_statuscode ON notification USING btree (statuscode);
346
347 CREATE INDEX not_priority ON notification USING btree (priority);
348
349 CREATE INDEX not_escalation_count_timestamp ON notification USING btree (escalation_count_timestamp);
350
351 CREATE INDEX not_repeat_notification_timesta ON notification USING btree (repeat_notification_timestamp);
352
353 SELECT setval ('"notification_notificationid_seq"', 1, false);
354
355 --
356 --
357
358 CREATE SEQUENCE "object_objectid_seq";
359
360 CREATE TABLE "object"
361 (
362         "objectid" bigint DEFAULT nextval('"object_objectid_seq"'::text) NOT NULL,
363         "objectname" text,
364         "objectcode" text,
365         "scp_enabled" boolean,
366         "scp_inet" inet,
367         "mail_enabled" boolean,
368         "mail_from" text,
369         "sms_enabled" boolean,
370         "sms_number" text,
371         "fax_enabled" boolean,
372         "fax_number" text,
373         "object_description" text,
374         "object_owner" text,
375         "physical_location" text,
376         "timezone" text,
377         "remark" text,
378         "os"     text,
379         "os_version"   text,
380         "log_count"    bigint,
381         "notification_count"   bigint,
382         "parameter_count"      bigint
383 );
384
385 CREATE UNIQUE INDEX object_objectid_key ON object USING btree (objectid);
386
387 CREATE UNIQUE INDEX obj_objectname ON object USING btree (objectname);
388
389 CREATE UNIQUE INDEX obj_objectcode ON object USING btree (objectcode);
390
391 CREATE INDEX obj_mail_from ON object USING btree (mail_from);
392
393 CREATE INDEX os ON object (os);
394
395 CREATE INDEX os_version ON object (os, os_version);
396
397 SELECT setval ('"object_objectid_seq"', 1, false);
398
399 --
400 --
401
402 CREATE TABLE "object_issue"
403 (
404         "objectid" bigint,
405         "type_of_issueid" bigint,
406         "default_priority" integer,
407         "escalation" boolean,
408         "escalation_time" time without time zone,
409         "max_priority" integer,
410         "adjust_setting" text
411 );
412
413 CREATE UNIQUE INDEX obj_pk ON object_issue USING btree (objectid, type_of_issueid);
414
415 CREATE INDEX obj_objectid ON object_issue USING btree (objectid);
416
417 CREATE UNIQUE INDEX obj_type_of_notificationid ON object_issue USING btree (type_of_issueid);
418
419 --
420 --
421
422 CREATE TABLE "object_priority"
423 (
424         "objectid" bigint,
425         "priorityid" integer,
426         "send_mail" boolean,
427         "send_sms" boolean,
428         "send_fax" boolean,
429         "repeat_notification" boolean,
430         "interval_for_repeat" time without time zone
431 );
432
433 CREATE UNIQUE INDEX obi_pk ON object_priority USING btree (objectid, priorityid);
434
435 CREATE INDEX obi_objectid ON object_priority USING btree (objectid);
436
437 CREATE INDEX obi_priorityid ON object_priority USING btree (priorityid);
438
439 --
440 --
441
442 CREATE TABLE "object_service"
443 (
444         "objectid" bigint,
445         "servicecode" text,
446         "expected_interval" bigint,
447         "last_entry" timestamp with time zone,
448         "default_priority" integer,
449         "maximum_priority" integer,
450         "accepted" boolean
451 );
452
453 CREATE UNIQUE INDEX obs_pk ON object_service USING btree (objectid, servicecode);
454
455 CREATE INDEX obs_objectid ON object_service USING btree (objectid);
456
457 CREATE INDEX obs_servicecode ON object_service USING btree (servicecode);
458
459 CREATE INDEX obs_accepted ON object_service USING btree (accepted);
460
461 --
462 --
463
464 CREATE TABLE "object_user"
465 (
466         "objectid" bigint,
467         "username" text,
468         "security_level" integer
469 );
470
471 CREATE UNIQUE INDEX ous_pk ON object_user USING btree (objectid, username);
472
473 CREATE INDEX ous_objectid ON object_user USING btree (objectid);
474
475 CREATE INDEX ous_username ON object_user USING btree (username);
476
477 CREATE INDEX ous_security_level ON object_user USING btree (security_level);
478
479 --
480 --
481
482 CREATE SEQUENCE "paramid_seq";
483
484 CREATE TABLE "parameter"
485 (
486         "paramid" bigint DEFAULT nextval('"paramid_seq"'::text) NOT NULL,
487         "objectid" bigint,
488         "name" text,
489         "class" text,
490         "description" text,
491
492         primary key (paramid)
493 );
494
495 CREATE UNIQUE INDEX param_obj_name ON parameter USING btree (objectid, name, class);
496
497 SELECT setval ('"paramid_seq"', 1, true);
498
499 --
500 --
501
502 CREATE TABLE "parameter_class"
503 (
504    "name"             text,     --  Name of the class: see parameter.class
505    "property_name"    text,
506    "description"      text,
507    "property_type"    text,     --  STATIC or DYNAMIC
508    "min"              float,    --  Default minimum value
509    "max"              float,    --  Default maximum value
510    "notify"           boolean,  --  Notify if something changes ?
511
512    primary key (name, property_name)
513 );
514
515 INSERT INTO parameter_class (name, property_name, description, property_type, notify)
516   VALUES ('package', 'version', 'The installed version of the package', 'STATIC', 't');
517
518 --
519 --
520
521 CREATE TABLE "parameter_notification"
522 (
523    "notificationid" bigint,
524    "paramid"        bigint,
525
526    primary key (notificationid, paramid)
527 );
528
529 --
530 --
531
532 CREATE TABLE "priority"
533 (
534         "priority" integer,
535         "send_mail" boolean,
536         "send_sms" boolean,
537         "send_fax" boolean,
538         "repeat_notification" boolean,
539         "interval_for_repeat" time without time zone
540 );
541
542
543 CREATE UNIQUE INDEX pri_pk ON priority USING btree (priority);
544
545 --
546 --
547
548 CREATE TABLE "property"
549 (
550    paramid bigint,
551    name    text,
552    value   text,
553    type    text,   --   STATIC or DYNAMIC
554    min     float,
555    max     float,
556
557    primary key (paramid, name)
558 );
559
560 --
561 --
562
563 CREATE TABLE "service"
564 (
565         "servicecode" text,
566         "servicename" text,
567         "default_priority" integer,
568         "max_priority" integer
569 );
570
571 COPY "service" FROM stdin;
572 httpd   httpd   1       5
573 imap    imap    1       5
574 imapd   imapd   1       5
575 kernel  kernel  1       5
576 sshd    sshd    1       5
577 su      su      1       5
578 syslogd syslogd 1       5
579 \.
580
581 CREATE UNIQUE INDEX ser_pk ON service USING btree (servicecode);
582
583 CREATE UNIQUE INDEX ser_servicename ON service USING btree (servicename);
584
585 --
586
587 CREATE TABLE "status"
588 (
589         "statuscode" character varying(3),
590         "statusname" text,
591         "open_notification" boolean,
592         "description" text
593 );
594
595
596 COPY "status" FROM stdin;
597 new     new entry       t       Just detected, but nothing has been done yet
598 opn     open notification       t       The notification has been displayed to a user or a user has been notified. However nothing has been done yet.
599 pen     pending t       The notification is currently being worked on.
600 ver     waiting for verification        t       The notification has been worked on and is currently awaiting the approval/verification.
601 rej     rejected        f       The notification has been identified as a false postive and was reject. The notification is now closed
602 cls     closed  f       The notification has been closed
603 inv     needs investigation     t       The notification is currently under investigation and is awaiting additional details before one can work on this again.
604 \.
605
606 CREATE UNIQUE INDEX sta_pk ON status USING btree (statuscode);
607
608 CREATE UNIQUE INDEX sta_statusname ON status USING btree (statusname);
609
610 CREATE INDEX sta_open_notification ON status USING btree (open_notification);
611
612 --
613 --
614
615 CREATE TABLE supported_os
616 (
617     os_name text,
618     remarks text
619 );
620
621 CREATE UNIQUE INDEX spp_os ON supported_os (os_name);
622
623 --
624 --
625
626 CREATE SEQUENCE "type_of_issue_type_of_issue_seq";
627
628 CREATE TABLE "type_of_issue"
629 (
630         "type_of_issueid" bigint DEFAULT
631            nextval('"type_of_issue_type_of_issue_seq"'::text) NOT NULL,
632         "name" text,
633         "suggested_priority" text,
634         "description" text,
635         "active" boolean,
636         automated_check       boolean,
637         alert_level           int,
638         last_run              timestamp,
639         recheck_interval      timestamp
640 );
641
642
643 COPY "type_of_issue" FROM stdin;
644 1       manual entry    4       A manual entry of a notification        t
645 2       parameter created       3       A new parameter was created     t
646 3       property modified       3       The STATIC property of a parameter was modified t
647 4       parameter removed       3       A parameter was removed t
648 \.
649
650 CREATE UNIQUE INDEX type_of_issue_type_of_issue_key ON type_of_issue USING btree (type_of_issueid);
651
652 CREATE UNIQUE INDEX toi_name ON type_of_issue USING btree (name);
653
654 CREATE INDEX toi_active ON type_of_issue USING btree (active);
655
656 SELECT setval ('"type_of_issue_type_of_issue_seq"', 4, true);
657
658 --
659 --
660
661 CREATE TABLE "usr"
662 (
663         "username" text NOT NULL,
664         "active_sessionid" bigint,
665         "account_active" boolean,
666         "security_level" integer
667 );
668
669 CREATE UNIQUE INDEX usr_username ON usr USING btree (username);
670
671 CREATE UNIQUE INDEX usr_active_sessionid ON usr USING btree (active_sessionid);
672
673 CREATE INDEX usr_account_active ON usr USING btree (account_active);
674
675 CREATE INDEX usr_security_level ON usr USING btree (security_level);
676
677 --
678 --  Set up user groups and grant permissions in the proper places.
679
680 CREATE GROUP view;
681 CREATE GROUP ops;
682 CREATE GROUP admin;
683
684 GRANT SELECT ON action TO GROUP view, GROUP ops, GROUP admin;
685 GRANT SELECT ON action_user TO GROUP view, GROUP ops, GROUP admin;
686 GRANT SELECT ON db_value TO GROUP view, GROUP ops, GROUP admin;
687 GRANT SELECT ON history TO GROUP view, GROUP ops, GROUP admin;
688 GRANT SELECT ON log TO GROUP view, GROUP ops, GROUP admin;
689 GRANT SELECT ON log_adv TO GROUP view, GROUP ops, GROUP admin;
690 GRANT SELECT ON log_adv_daemon TO GROUP view, GROUP ops, GROUP admin;
691 GRANT SELECT ON log_adv_kernel_network TO GROUP view, GROUP ops, GROUP admin;
692 GRANT SELECT ON log_notification TO GROUP view, GROUP ops, GROUP admin;
693 GRANT SELECT ON notification TO GROUP view, GROUP ops, GROUP admin;
694 GRANT SELECT ON object TO GROUP view, GROUP ops, GROUP admin;
695 GRANT SELECT ON object_issue TO GROUP view, GROUP ops, GROUP admin;
696 GRANT SELECT ON object_priority TO GROUP view, GROUP ops, GROUP admin;
697 GRANT SELECT ON object_service TO GROUP view, GROUP ops, GROUP admin;
698 GRANT SELECT ON object_user TO GROUP view, GROUP ops, GROUP admin;
699 GRANT SELECT ON parameter TO GROUP view, GROUP ops, GROUP admin;
700 GRANT SELECT ON parameter_class TO GROUP view, GROUP ops, GROUP admin;
701 GRANT SELECT ON parameter_notification TO GROUP view, GROUP ops, GROUP admin;
702 GRANT SELECT ON priority TO GROUP view, GROUP ops, GROUP admin;
703 GRANT SELECT ON property TO GROUP view, GROUP ops, GROUP admin;
704 GRANT SELECT ON service TO GROUP view, GROUP ops, GROUP admin;
705 GRANT SELECT ON status TO GROUP view, GROUP ops, GROUP admin;
706 GRANT SELECT ON supported_os TO GROUP view, GROUP ops, GROUP admin;
707 GRANT SELECT ON type_of_issue TO GROUP view, GROUP ops, GROUP admin;
708 GRANT SELECT ON usr TO GROUP view, GROUP ops, GROUP admin;
709
710 GRANT INSERT ON action_user TO GROUP ops, GROUP admin;
711 GRANT UPDATE ON notification TO GROUP ops, GROUP admin;
712 GRANT INSERT ON object GROUP admin;
713 GRANT UPDATE ON object TO GROUP ops, GROUP admin;
714 GRANT DELETE ON object GROUP admin;
715 GRANT UPDATE ON usr TO GROUP view, GROUP ops, GROUP admin;
716 GRANT INSERT ON usr TO GROUP admin;
717 GRANT DELETE ON usr TO GROUP admin;