CREATE TABLE IF NOT EXISTS `vehicle_status_history` (
`vehicle_status_history_id` int(11) NOT NULL AUTO_INCREMENT,
`vehicle_id` int(11) NOT NULL,
`vehicle_status_id` int(11) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`user_id` int(11) DEFAULT NULL,
PRIMARY KEY (`vehicle_status_history_id`),
KEY `fk_vehicle_status_history1_idx` (`vehicle_id`),
KEY `fk_vehicle_status_history2_idx` (`vehicle_status_id`),
KEY `fk_vehicle_status_history3_idx` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;