Closed
Description
Hi,
One of the limitations of PCA is Primary keys should either be auto-increment (from 1 to 2^53) or UUID
Does this structure is supported by PCA?
--Table: tbl_name
--DROP TABLE IF EXISTS tbl_name;
CREATE TABLE tbl_name (
id_name char(36) NOT NULL,
title varchar(20) NOT NULL,
/* Keys */
PRIMARY KEY (id_name)
) ENGINE = InnoDB;
DELIMITER |
CREATE DEFINER = 'root'@'localhost' TRIGGER trigger01
BEFORE INSERT
ON tbl_name
FOR EACH ROW
BEGIN
/* Trigger text */
IF new.id_name IS NULL THEN
SET new.id_name = uuid();
END IF;
END|
DELIMITER ;