First, thank to the Yii team, you guys made a wonderful framework.
I’m a newbie in Yii, there is a bit of uncomfortable of Gii when I used it.
I usually use MySQL for my websites, and then, the ENUM and SET datatype is my favorite. Whenever I use Gii to generate CRUB code, it seems like Gii doesn’t understand 2 above datatypes. It generated form fields like a text or int datatype. I had to modify CRUB code manually.
As my thinking, Gii should generate a dropdownlist for ENUM type, and a multi select options for SET type.
What do you think?
This is my table create statement.
[sql]CREATE TABLE rv.member(
id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
email VARCHAR(255) NOT NULL,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
display_name VARCHAR(255) NOT NULL,
skype VARCHAR(255) DEFAULT NULL,
phone VARCHAR(255) DEFAULT NULL,
ym VARCHAR(255) DEFAULT NULL,
src ENUM(‘GOOGLE’, ‘YAHOO’) NOT NULL,
roles SET(‘MEMBER’, ‘MODERATOR’, ‘ADMIN’, ‘SUPER_ADMIN’) NOT NULL DEFAULT ‘MEMBER’,
PRIMARY KEY (id),
UNIQUE INDEX email (email)
ENGINE = INNODB