Netinfo DB conversion steps:

1) Stop the processor
2) export DB
3) Copy export file
4) Alter the following in the export copy:
   - remove 'on update' triggers from alert_data
   - remove 'on update' triggers from alert_action
   - remove 'on update' triggers from alert_history
   - Add column to alert_data: 'ad_type int(11) NOT NULL' (before ad_name)
   - Add the (columns) expression to the insert statement for alert_data
     '(ad_id,ad_a_id,ad_timestamp,ad_name,ad_data) '
   - Add column to alert: 'a_hitcount int(11) NOT NULL default 1' (before a_hostname)
   - Add the (columns) expression to the insert statement for alert
     '(a_id,a_alerttime,a_lasttime,a_class,a_severity,a_state,a_uniqueid,a_hostname,a_object,a_message) '
5) Drop all tables from the existing DB
6) Import the altered export copy
7) update alert_data set ad_type = 6 where ad_name = 'NOTE'
8) update alert_data set ad_name = 'SYSTEM' where ad_type = 6
9) insert into alert_data (ad_a_id,ad_timestamp,ad_type,ad_name,ad_data) select aa_a_id,aa_timestamp,1,'ACTION',aa_info from alert_action where aa_user = 'TRAP'
10) insert into alert_data (ad_a_id,ad_timestamp,ad_type,ad_name,ad_data) select aa_a_id,aa_timestamp,2,aa_user,aa_info from alert_action where aa_user != 'TRAP'
11) update alert_data set ad_type = 2, ad_name = 'USER' where ad_type = 6 and ad_data not like '%timestamp %' and ad_data not like '%SNMP%'
12) update alert_data set ad_type = 3 where ad_type = 2 and ad_data = 'Alert acknowledged.'
13) update alert_data set ad_type = 5 where ad_type = 2 and ad_data = 'Alert resolved.'
14) create table temp_migrate ( id bigint(20))
15) insert into temp_migrate (id) select ad_id from alert_data,alert where ad_a_id = a_id and ad_timestamp = a_lasttime and a_state = 4
16) update alert_data set ad_type = 4 where ad_id in (select id from temp_migrate)
17) drop table temp_migrate
18) (steps 19-22) should fix this) update alert_data set ad_type = 4 where ad_type = 1 and ad_name = 'ACTION' and ad_data like '%is UP%'
19) create table temp_migrate ( id bigint(20))
20) insert into temp_migrate select ad_id from alert_data,alert where ad_a_id = a_id and ad_timestamp = a_lasttime and a_state = 5 and ad_type = 1
21) update alert_data set ad_type = 4 where ad_id in (select id from temp_migrate)
22) drop table temp_migrate
23) Replace the processor script with the new one
23) Start the processor

Steps 7 through 22 can be executed, directly from this document, with the following command:
cat netinfo-db-0.1-to-0.2-migration.txt|grep '^[0-9]'|cut -d' ' -f2-|egrep "^update |^insert |^create |^drop " | while read LINE ; do echo "Executing SQL '$LINE;'" ; echo "$LINE;"|mysql -p netinfo ; echo "rc=$?" ; printf "\n" ; done


