Ver originalALTER TABLE `usuarios` ADD CONSTRAINT `usuarios_ibfk_1` FOREIGN KEY (`idusuario`) REFERENCES `historial` (`idhistorial`) ON DELETE CASCADE ON UPDATE CASCADE;
Ver originalALTER TABLE `historial` ADD CONSTRAINT `historial_ibfk_1` FOREIGN KEY (`idhistorial`) REFERENCES `usuarios` (`idusuario`) ON DELETE NO ACTION ON UPDATE NO ACTION;