mirror of https://github.com/Icinga/icinga2.git
Merge pull request #8425 from Icinga/bugfix/hosts-128-characters-7472
IDO MySQL: support larger host and service names
This commit is contained in:
commit
89472a9e51
|
@ -23,7 +23,7 @@ REGISTER_STATSFUNCTION(IdoMysqlConnection, &IdoMysqlConnection::StatsFunc);
|
||||||
|
|
||||||
const char * IdoMysqlConnection::GetLatestSchemaVersion() const noexcept
|
const char * IdoMysqlConnection::GetLatestSchemaVersion() const noexcept
|
||||||
{
|
{
|
||||||
return "1.15.0";
|
return "1.15.1";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * IdoMysqlConnection::GetCompatSchemaVersion() const noexcept
|
const char * IdoMysqlConnection::GetCompatSchemaVersion() const noexcept
|
||||||
|
|
|
@ -866,8 +866,8 @@ CREATE TABLE IF NOT EXISTS icinga_objects (
|
||||||
object_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
object_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
instance_id bigint unsigned default 0,
|
instance_id bigint unsigned default 0,
|
||||||
objecttype_id bigint unsigned default 0,
|
objecttype_id bigint unsigned default 0,
|
||||||
name1 varchar(128) character set latin1 collate latin1_general_cs default '',
|
name1 varchar(255) character set latin1 collate latin1_general_cs default '',
|
||||||
name2 varchar(128) character set latin1 collate latin1_general_cs default NULL,
|
name2 varchar(255) character set latin1 collate latin1_general_cs default NULL,
|
||||||
is_active smallint default 0,
|
is_active smallint default 0,
|
||||||
PRIMARY KEY (object_id),
|
PRIMARY KEY (object_id),
|
||||||
KEY objecttype_id (objecttype_id,name1,name2)
|
KEY objecttype_id (objecttype_id,name1,name2)
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
-- -----------------------------------------
|
||||||
|
-- upgrade path for Icinga 2.13.0
|
||||||
|
--
|
||||||
|
-- -----------------------------------------
|
||||||
|
-- Icinga 2 | (c) 2021 Icinga GmbH | GPLv2+
|
||||||
|
--
|
||||||
|
-- Please check https://docs.icinga.com for upgrading information!
|
||||||
|
-- -----------------------------------------
|
||||||
|
|
||||||
|
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
||||||
|
|
||||||
|
-- ----------------------------------------
|
||||||
|
-- #7472 Support hosts with >128 characters
|
||||||
|
-- ----------------------------------------
|
||||||
|
|
||||||
|
ALTER TABLE icinga_objects
|
||||||
|
MODIFY COLUMN name1 varchar(255) character set latin1 collate latin1_general_cs default '',
|
||||||
|
MODIFY COLUMN name2 varchar(255) character set latin1 collate latin1_general_cs default NULL;
|
||||||
|
|
||||||
|
-- -------------
|
||||||
|
-- set dbversion
|
||||||
|
-- -------------
|
||||||
|
INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.15.1', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.15.1', modify_time=NOW();
|
Loading…
Reference in New Issue