diff options
author | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2022-01-20 00:27:44 +0300 |
---|---|---|
committer | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2022-01-20 10:44:10 +0300 |
commit | 15cab59367b31063d710011bc290ab8454c0239c (patch) | |
tree | 25cc1396874613349cf665259d05dea7c5a8ff18 | |
parent | deb893fe94e7947a4a47d339af4fbd97d3b78bf6 (diff) |
........S. [ZBX-20420] increased storage size of the 'parameters' field of the 'alerts' table for Oracle backend
-rw-r--r-- | ChangeLog.d/bugfix/ZBX-20420 | 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/bugfix/ZBX-20420 b/ChangeLog.d/bugfix/ZBX-20420 new file mode 100644 index 00000000000..42bea6715a7 --- /dev/null +++ b/ChangeLog.d/bugfix/ZBX-20420 @@ -0,0 +1 @@ +........S. [ZBX-20420] increased storage size of the 'parameters' field of the 'alerts' table for Oracle backend (arimdjonoks) diff --git a/create/src/schema.tmpl b/create/src/schema.tmpl index eba52590ac5..ba3b86b4792 100644 --- a/create/src/schema.tmpl +++ b/create/src/schema.tmpl @@ -975,7 +975,7 @@ FIELD |esc_step |t_integer |'0' |NOT NULL |0 FIELD |alerttype |t_integer |'0' |NOT NULL |0 FIELD |p_eventid |t_id | |NULL |0 |5|events |eventid FIELD |acknowledgeid |t_id | |NULL |0 |6|acknowledges |acknowledgeid -FIELD |parameters |t_shorttext |'{}' |NOT NULL |0 +FIELD |parameters |t_text |'{}' |NOT NULL |0 INDEX |1 |actionid INDEX |2 |clock INDEX |3 |eventid @@ -1937,4 +1937,4 @@ FIELD |dbversionid |t_id | |NOT NULL |0 FIELD |mandatory |t_integer |'0' |NOT NULL | FIELD |optional |t_integer |'0' |NOT NULL | -ROW |1 |5050142 |5050142 +ROW |1 |5050143 |5050143 diff --git a/src/libs/zbxdbupgrade/dbupgrade_5050.c b/src/libs/zbxdbupgrade/dbupgrade_5050.c index 97e4c5758f5..71d1875708c 100644 --- a/src/libs/zbxdbupgrade/dbupgrade_5050.c +++ b/src/libs/zbxdbupgrade/dbupgrade_5050.c @@ -1887,6 +1887,14 @@ static int DBpatch_5050142(void) return SUCCEED; } +static int DBpatch_5050143(void) +{ + const ZBX_FIELD old_field = {"parameters", "{}", NULL, NULL, 0, ZBX_TYPE_SHORTTEXT, ZBX_NOTNULL, 0}; + const ZBX_FIELD field = {"parameters", "{}", NULL, NULL, 0, ZBX_TYPE_TEXT, ZBX_NOTNULL, 0}; + + return DBmodify_field_type("alerts", &field, &old_field); +} + #endif DBPATCH_START(5050) @@ -2023,5 +2031,6 @@ DBPATCH_ADD(5050139, 0, 1) DBPATCH_ADD(5050140, 0, 1) DBPATCH_ADD(5050141, 0, 1) DBPATCH_ADD(5050142, 0, 1) +DBPATCH_ADD(5050143, 0, 1) DBPATCH_END() diff --git a/ui/include/defines.inc.php b/ui/include/defines.inc.php index 3e54054dd0c..5383a155d6a 100644 --- a/ui/include/defines.inc.php +++ b/ui/include/defines.inc.php @@ -22,7 +22,7 @@ define('ZABBIX_VERSION', '6.0.0rc1'); define('ZABBIX_API_VERSION', '6.0.0'); define('ZABBIX_EXPORT_VERSION', '6.0'); -define('ZABBIX_DB_VERSION', 5050142); +define('ZABBIX_DB_VERSION', 5050143); 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 c3513302e3e..054eb3c2f8e 100644 --- a/ui/include/schema.inc.php +++ b/ui/include/schema.inc.php @@ -4522,7 +4522,7 @@ return [ ], 'parameters' => [ 'null' => false, - 'type' => DB::FIELD_TYPE_TEXT, + 'type' => DB::FIELD_TYPE_NCLOB, 'default' => '{}' ] ] |