CREATE TABLE `hops_to_hops` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `hops_id` int(11) unsigned NOT NULL, `replacements_id` int(11) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique_hop_replacement` (`hops_id`,`replacements_id`), KEY `index_hop` (`hops_id`), KEY `index_replacement` (`replacements_id`), CONSTRAINT `hops_to_hops_ibfk_1` FOREIGN KEY (`hops_id`) REFERENCES `hops` (`id`) ON DELETE CASCADE, CONSTRAINT `hops_to_hops_ibfk_2` FOREIGN KEY (`replacements_id`) REFERENCES `hops` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=543 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci