ALTER TABLE IF EXISTS `vn2008`.`albaran_state` RENAME `vn`.`deliveryNoteState`;

ALTER TABLE IF EXISTS `vn`.`deliveryNoteState`
CHANGE COLUMN IF EXISTS `albaran_state_id` `id`int(11) NOT NULL AUTO_INCREMENT;