diff options
author | Andrejs Kozlovs <andrejs.kozlovs@zabbix.com> | 2021-11-30 17:12:26 +0300 |
---|---|---|
committer | Andrejs Kozlovs <andrejs.kozlovs@zabbix.com> | 2021-11-30 17:12:26 +0300 |
commit | fdb5d2f5851314de8fa923bc8365a5cc5276b42c (patch) | |
tree | f6785541a51de059ad5fda7e2d90d352875c00cd | |
parent | f40d0a4c62bad50c3057cce588d3a44079990272 (diff) |
....I..... [ZBXNEXT-7085] extended formula field in actions table from 255 to 1024 characters
-rw-r--r-- | ChangeLog.d/feature/ZBXNEXT-7085 | 1 | ||||
-rw-r--r-- | create/src/schema.tmpl | 4 | ||||
-rw-r--r-- | src/libs/zbxdbupgrade/dbupgrade_5050.c | 9 | ||||
-rw-r--r-- | ui/include/defines.inc.php | 2 | ||||
-rw-r--r-- | ui/include/schema.inc.php | 2 |
5 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog.d/feature/ZBXNEXT-7085 b/ChangeLog.d/feature/ZBXNEXT-7085 new file mode 100644 index 00000000000..e42bde43eeb --- /dev/null +++ b/ChangeLog.d/feature/ZBXNEXT-7085 @@ -0,0 +1 @@ +....I..... [ZBXNEXT-7085] extended formula field in actions table from 255 to 1024 characters (akozlovs) diff --git a/create/src/schema.tmpl b/create/src/schema.tmpl index 901adab5f02..17cdd6c6ffc 100644 --- a/create/src/schema.tmpl +++ b/create/src/schema.tmpl @@ -388,7 +388,7 @@ FIELD |eventsource |t_integer |'0' |NOT NULL |0 FIELD |evaltype |t_integer |'0' |NOT NULL |0 FIELD |status |t_integer |'0' |NOT NULL |0 FIELD |esc_period |t_varchar(255) |'1h' |NOT NULL |0 -FIELD |formula |t_varchar(255) |'' |NOT NULL |0 +FIELD |formula |t_varchar(1024)|'' |NOT NULL |0 FIELD |pause_suppressed|t_integer |'1' |NOT NULL |0 INDEX |1 |eventsource,status UNIQUE |2 |name @@ -1905,4 +1905,4 @@ TABLE|dbversion|dbversionid| FIELD |dbversionid |t_id | |NOT NULL |0 FIELD |mandatory |t_integer |'0' |NOT NULL | FIELD |optional |t_integer |'0' |NOT NULL | -ROW |1 |5050111 |5050111 +ROW |1 |5050112 |5050112 diff --git a/src/libs/zbxdbupgrade/dbupgrade_5050.c b/src/libs/zbxdbupgrade/dbupgrade_5050.c index c3f68c2682e..ae72a0a6ee2 100644 --- a/src/libs/zbxdbupgrade/dbupgrade_5050.c +++ b/src/libs/zbxdbupgrade/dbupgrade_5050.c @@ -1185,6 +1185,14 @@ static int DBpatch_5050111(void) return DBcreate_index("alerts", "alerts_8", "acknowledgeid", 0); } + +static int DBpatch_5050112(void) +{ + const ZBX_FIELD old_field = {"formula", "", NULL, NULL, 255, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0}; + const ZBX_FIELD new_field = {"formula", "", NULL, NULL, 1024, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0}; + + return DBmodify_field_type("actions", &new_field, &old_field); +} #endif DBPATCH_START(5050) @@ -1290,5 +1298,6 @@ DBPATCH_ADD(5050108, 0, 1) DBPATCH_ADD(5050109, 0, 1) DBPATCH_ADD(5050110, 0, 1) DBPATCH_ADD(5050111, 0, 1) +DBPATCH_ADD(5050112, 0, 1) DBPATCH_END() diff --git a/ui/include/defines.inc.php b/ui/include/defines.inc.php index 533fd60dc50..eb7617c0c44 100644 --- a/ui/include/defines.inc.php +++ b/ui/include/defines.inc.php @@ -22,7 +22,7 @@ define('ZABBIX_VERSION', '6.0.0alpha8'); define('ZABBIX_API_VERSION', '6.0.0'); define('ZABBIX_EXPORT_VERSION', '6.0'); -define('ZABBIX_DB_VERSION', 5050111); +define('ZABBIX_DB_VERSION', 5050112); define('DB_VERSION_SUPPORTED', 0); define('DB_VERSION_LOWER_THAN_MINIMUM', 1); diff --git a/ui/include/schema.inc.php b/ui/include/schema.inc.php index 81803c63833..47cc3d0a5c5 100644 --- a/ui/include/schema.inc.php +++ b/ui/include/schema.inc.php @@ -1770,7 +1770,7 @@ return [ 'formula' => [ 'null' => false, 'type' => DB::FIELD_TYPE_CHAR, - 'length' => 255, + 'length' => 1024, 'default' => '' ], 'pause_suppressed' => [ |