ALTER TABLE IF EXISTS `vn2008`.`albaran_gestdoc` RENAME `vn`.`deliveryNoteDms`;

ALTER TABLE IF EXISTS `vn`.`deliveryNoteDms`
CHANGE COLUMN IF EXISTS `gestdoc_id` `dmsFk` int(11) NOT NULL,
CHANGE COLUMN IF EXISTS `albaran_id` `deliveryNoteFk` int(11) NOT NULL;