@@ -40,7 +40,7 @@ CREATE TABLE available_channel_type (
40
40
41
41
CREATE TABLE channel (
42
42
id bigserial ,
43
- name text NOT NULL ,
43
+ name citext NOT NULL ,
44
44
type text NOT NULL REFERENCES available_channel_type(type), -- 'email', 'sms', ...
45
45
config text , -- JSON with channel-specific attributes
46
46
-- for now type determines the implementation, in the future, this will need a reference to a concrete
@@ -51,8 +51,8 @@ CREATE TABLE channel (
51
51
52
52
CREATE TABLE contact (
53
53
id bigserial ,
54
- full_name text NOT NULL ,
55
- username text , -- reference to web user
54
+ full_name citext NOT NULL ,
55
+ username citext , -- reference to web user
56
56
default_channel_id bigint NOT NULL REFERENCES channel(id),
57
57
color varchar (7 ) NOT NULL , -- hex color codes e.g #000000
58
58
@@ -72,7 +72,7 @@ CREATE TABLE contact_address (
72
72
73
73
CREATE TABLE contactgroup (
74
74
id bigserial ,
75
- name text NOT NULL ,
75
+ name citext NOT NULL ,
76
76
color varchar (7 ) NOT NULL , -- hex color codes e.g #000000
77
77
78
78
CONSTRAINT pk_contactgroup PRIMARY KEY (id)
@@ -87,7 +87,7 @@ CREATE TABLE contactgroup_member (
87
87
88
88
CREATE TABLE schedule (
89
89
id bigserial ,
90
- name text NOT NULL ,
90
+ name citext NOT NULL ,
91
91
92
92
CONSTRAINT pk_schedule PRIMARY KEY (id)
93
93
);
@@ -163,7 +163,7 @@ CREATE TABLE source (
163
163
id bigserial ,
164
164
-- The type "icinga2" is special and requires (at least some of) the icinga2_ prefixed columns.
165
165
type text NOT NULL ,
166
- name text NOT NULL ,
166
+ name citext NOT NULL ,
167
167
-- will likely need a distinguishing value for multiple sources of the same type in the future, like for example
168
168
-- the Icinga DB environment ID for Icinga 2 sources
169
169
@@ -230,14 +230,14 @@ CREATE TABLE event (
230
230
type text NOT NULL ,
231
231
severity severity,
232
232
message text ,
233
- username text ,
233
+ username citext ,
234
234
235
235
CONSTRAINT pk_event PRIMARY KEY (id)
236
236
);
237
237
238
238
CREATE TABLE rule (
239
239
id bigserial ,
240
- name text NOT NULL ,
240
+ name citext NOT NULL ,
241
241
timeperiod_id bigint REFERENCES timeperiod(id),
242
242
object_filter text ,
243
243
is_active boolenum NOT NULL DEFAULT ' y' ,
@@ -250,7 +250,7 @@ CREATE TABLE rule_escalation (
250
250
rule_id bigint NOT NULL REFERENCES rule(id),
251
251
position integer NOT NULL ,
252
252
condition text ,
253
- name text , -- if not set, recipients are used as a fallback for display purposes
253
+ name citext , -- if not set, recipients are used as a fallback for display purposes
254
254
fallback_for bigint REFERENCES rule_escalation(id),
255
255
256
256
CONSTRAINT pk_rule_escalation PRIMARY KEY (id),
0 commit comments