Merge pull request #420 from Icinga/bugfix/notification_history-text-longtext

Schema: make notification_history#text longtext
This commit is contained in:
Julian Brost 2022-02-17 13:37:09 +01:00 committed by GitHub
commit fffe176988
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View file

@ -27,7 +27,7 @@ const (
ExitSuccess = 0
ExitFailure = 1
expectedRedisSchemaVersion = "4"
expectedDbSchemaVersion = 2
expectedDbSchemaVersion = 3
)
func main() {

View file

@ -945,7 +945,7 @@ CREATE TABLE notification_history (
state tinyint unsigned NOT NULL,
previous_hard_state tinyint unsigned NOT NULL,
author text NOT NULL,
`text` text NOT NULL,
`text` longtext NOT NULL,
users_notified smallint unsigned NOT NULL,
PRIMARY KEY (id),
@ -1121,4 +1121,4 @@ CREATE TABLE icingadb_schema (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
INSERT INTO icingadb_schema (version, timestamp)
VALUES (2, CURRENT_TIMESTAMP() * 1000);
VALUES (3, CURRENT_TIMESTAMP() * 1000);

View file

@ -0,0 +1,5 @@
ALTER TABLE notification_history
MODIFY `text` longtext NOT NULL;
INSERT INTO icingadb_schema (version, timestamp)
VALUES (3, CURRENT_TIMESTAMP() * 1000);