ALTER TABLE  `alert_table` ADD  `last_checked` INT( 10 ) NULL DEFAULT NULL ,ADD  `last_changed` INT( 10 ) NULL DEFAULT NULL ,ADD  `last_recovered` INT( 10 ) NULL DEFAULT NULL ,ADD  `last_ok` INT( 10 ) NULL DEFAULT NULL ,ADD  `last_failed` INT( 10 ) NULL DEFAULT NULL ,ADD  `has_alerted` TINYINT( 1 ) NOT NULL ,ADD  `last_message` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,ADD  `alert_status` TINYINT( 4 ) NOT NULL DEFAULT  '-1',ADD  `last_alerted` INT( 11 ) NOT NULL ,ADD  `state` VARCHAR( 512 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,ADD  `count` INT( 11 ) NOT NULL ,ADD  `state_entry` TINYINT( 1 ) NOT NULL DEFAULT  '1';
UPDATE alert_table a, `alert_table-state` s   SET a.last_checked = s.last_checked,       a.last_changed = s.last_changed,       a.last_recovered = s.last_recovered,       a.last_ok = s.last_ok,       a.last_failed = s.last_failed,       a.has_alerted = s.last_alerted,       a.last_message = s.last_message,       a.alert_status = s.alert_status,       a.state = s.state,       a.count = s.count,       a.state_entry = s.state_entry WHERE a.alert_table_id = s.alert_table_id;

