ALTER TABLE IF EXISTS `vn2008`.`integra2` RENAME `vn`.`integra2`;

ALTER TABLE IF EXISTS `vn`.`integra2` 
CHANGE COLUMN IF EXISTS `postal_code` `postCode` varchar(10) NOT NULL,
CHANGE COLUMN IF EXISTS `frequency` `frequency` decimal(10,2) DEFAULT NULL,
CHANGE COLUMN IF EXISTS `warehouse_id` `warehouseFk` smallint(6) unsigned NOT NULL;

ALTER TABLE IF EXISTS vn.integra2 ADD CONSTRAINT integra2_warehouse_FK 
FOREIGN KEY (warehouseFk) REFERENCES vn.warehouse(id) ON DELETE CASCADE ON UPDATE CASCADE;

