icingadb/schema/mysql/upgrades/1.3.0.sql
Alvar Penning 27d27d4539
schema: Fix values to fit by increasing type sizes
The icon_image_alt column in both the host and service tables contains
an image alt text. However, because it is defined as a varchar(32), many
alt texts do not fit. The type has been expanded to text, as with most
free text fields.

Closes #752.

When defining a TimePeriod, the maximum length of a range value was
capped at 255 characters. This limitation has now also been removed by
switching to the Text type.

Closes #724.

While re-reading the schema, I stumbled upon some missing
properties_checksum comments that were also added.
2024-07-30 10:38:19 +02:00

11 lines
610 B
SQL

ALTER TABLE host MODIFY COLUMN icon_image_alt TEXT NOT NULL;
ALTER TABLE service MODIFY COLUMN icon_image_alt TEXT NOT NULL;
ALTER TABLE endpoint MODIFY COLUMN properties_checksum binary(20) NOT NULL COMMENT 'sha1(all properties)';
ALTER TABLE comment MODIFY COLUMN properties_checksum binary(20) NOT NULL COMMENT 'sha1(all properties)';
ALTER TABLE notification MODIFY COLUMN properties_checksum binary(20) NOT NULL COMMENT 'sha1(all properties)';
ALTER TABLE timeperiod_range MODIFY COLUMN range_value text NOT NULL;
INSERT INTO icingadb_schema (version, timestamp)
VALUES (6, UNIX_TIMESTAMP() * 1000);