CREATE TABLE vn.itemLog SELECT * FROM vn.entryLog LIMIT 0; ALTER TABLE `vn`.`itemLog` ADD INDEX `itemLogItemFk_idx` (`originFk` ASC), ADD INDEX `itemLogUserFk_idx` (`userFk` ASC); ALTER TABLE `vn`.`itemLog` ADD CONSTRAINT `itemLogItemFk` FOREIGN KEY (`originFk`) REFERENCES `vn2008`.`Articles` (`Id_Article`) ON DELETE NO ACTION ON UPDATE CASCADE, ADD CONSTRAINT `itemLogUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE;