I want a user ID with AUTO-INCREMENT AND a user code using UUID()
I want to verify that this will work properly without duplicating any user codes.
Thanks guys!
CREATE TABLE IF NOT EXISTS `accounts` (
`id` int NOT NULL AUTO_INCREMENT,
`user_code` varchar(60) DEFAULT (uuid()),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4 COLLATE=utf8mb4_general_ci;
I think it works, it looks like it will work but I wanna make sure (and also, I want this answer to remain here for other people 😀 thanks!)