Launcher/compat/auth/uuid/uuidgen.sql
2018-09-17 14:07:32 +07:00

8 lines
158 B
SQL

DELIMITER //
CREATE TRIGGER setUUID BEFORE INSERT ON users
FOR EACH ROW BEGIN
IF NEW.uuid IS NULL THEN
SET NEW.uuid = UUID();
END IF;
END; //
DELIMITER ;