@@ -147,7 +147,7 @@ function plugin_snver_setup_database() {
147147
148148 $ data = array ();
149149 $ data ['columns ' ][] = array ('name ' => 'host_id ' , 'type ' => 'int(11) ' , 'NULL ' => false );
150- $ data ['columns ' ][] = array ('name ' => 'data ' , 'type ' => 'varchar(512) ' , 'NULL ' => true );
150+ $ data ['columns ' ][] = array ('name ' => 'data ' , 'type ' => 'text ' , 'NULL ' => true );
151151 $ data ['columns ' ][] = array ('name ' => 'last_check ' , 'type ' => 'timestamp ' , 'NULL ' => false , 'default ' => '0000-00-00 00:00:00 ' );
152152 $ data ['primary ' ] = 'host_id ' ;
153153 $ data ['type ' ] = 'InnoDB ' ;
@@ -229,7 +229,7 @@ function plugin_snver_upgrade_database() {
229229
230230 if (!cacti_version_compare ($ oldv , $ current , '= ' )) {
231231
232- if (cacti_version_compare ($ oldv , '0.4 ' , '< ' )) {
232+ if (cacti_version_compare ($ oldv , '0.4 ' , '<= ' )) {
233233
234234 $ data = array ();
235235 $ data ['columns ' ][] = array ('name ' => 'host_id ' , 'type ' => 'int(11) ' , 'NULL ' => false );
@@ -240,6 +240,10 @@ function plugin_snver_upgrade_database() {
240240 $ data ['comment ' ] = 'snver history ' ;
241241 api_plugin_db_table_create ('snver ' , 'plugin_snver_history ' , $ data );
242242 }
243+
244+ if (cacti_version_compare ($ oldv , '0.5 ' , '<= ' )) {
245+ db_execute ('ALTER TABLE plugin_snver_history MODIFY COLUMN data text ' );
246+ }
243247 }
244248}
245249
0 commit comments