When replicating databases in a multiple-master scenario, challenge is being able to generate unique identifiers.
An easy solution to this problem is to take advantage of
UUIDs using a trigger:
CREATE TRIGGER `table-newid` BEFORE INSERT ON `table` FOR EACH ROW SET NEW.id = UUID();
