@@ -40,7 +40,7 @@ CREATE TABLE available_channel_type (
4040
4141CREATE TABLE channel (
4242 id bigserial ,
43- name text NOT NULL ,
43+ name citext NOT NULL ,
4444 type text NOT NULL REFERENCES available_channel_type(type), -- 'email', 'sms', ...
4545 config text , -- JSON with channel-specific attributes
4646 -- for now type determines the implementation, in the future, this will need a reference to a concrete
@@ -51,8 +51,8 @@ CREATE TABLE channel (
5151
5252CREATE TABLE contact (
5353 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
5656 default_channel_id bigint NOT NULL REFERENCES channel(id),
5757 color varchar (7 ) NOT NULL , -- hex color codes e.g #000000
5858
@@ -72,7 +72,7 @@ CREATE TABLE contact_address (
7272
7373CREATE TABLE contactgroup (
7474 id bigserial ,
75- name text NOT NULL ,
75+ name citext NOT NULL ,
7676 color varchar (7 ) NOT NULL , -- hex color codes e.g #000000
7777
7878 CONSTRAINT pk_contactgroup PRIMARY KEY (id)
@@ -87,7 +87,7 @@ CREATE TABLE contactgroup_member (
8787
8888CREATE TABLE schedule (
8989 id bigserial ,
90- name text NOT NULL ,
90+ name citext NOT NULL ,
9191
9292 CONSTRAINT pk_schedule PRIMARY KEY (id)
9393);
@@ -163,7 +163,7 @@ CREATE TABLE source (
163163 id bigserial ,
164164 -- The type "icinga2" is special and requires (at least some of) the icinga2_ prefixed columns.
165165 type text NOT NULL ,
166- name text NOT NULL ,
166+ name citext NOT NULL ,
167167 -- will likely need a distinguishing value for multiple sources of the same type in the future, like for example
168168 -- the Icinga DB environment ID for Icinga 2 sources
169169
@@ -230,14 +230,14 @@ CREATE TABLE event (
230230 type text NOT NULL ,
231231 severity severity,
232232 message text ,
233- username text ,
233+ username citext ,
234234
235235 CONSTRAINT pk_event PRIMARY KEY (id)
236236);
237237
238238CREATE TABLE rule (
239239 id bigserial ,
240- name text NOT NULL ,
240+ name citext NOT NULL ,
241241 timeperiod_id bigint REFERENCES timeperiod(id),
242242 object_filter text ,
243243 is_active boolenum NOT NULL DEFAULT ' y' ,
@@ -250,7 +250,7 @@ CREATE TABLE rule_escalation (
250250 rule_id bigint NOT NULL REFERENCES rule(id),
251251 position integer NOT NULL ,
252252 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
254254 fallback_for bigint REFERENCES rule_escalation(id),
255255
256256 CONSTRAINT pk_rule_escalation PRIMARY KEY (id),
0 commit comments