Launcher/compat/auth/uuid/uuidgen.sql

9 lines
158 B
MySQL
Raw Permalink Normal View History

2018-09-17 10:07:32 +03:00
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 ;