SHARE
TWEET

Untitled

a guest Aug 19th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ALTER TABLE `mcr_users`
  2. ADD COLUMN `uuid` CHAR(36) UNIQUE DEFAULT NULL,
  3.  
  4. DELIMITER //
  5. CREATE TRIGGER setUUID BEFORE INSERT ON `mcr_users`
  6. FOR EACH ROW BEGIN
  7. IF NEW.uuid IS NULL THEN
  8. SET NEW.uuid = UUID();
  9. END IF;
  10. END; //
  11. DELIMITER ;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top