Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: mat127 on March 21, 2006, 01:28:07 am
-
Hello,
I have found that MySQL ENUM type is supported within the data modeling since EA 4.50 Build 740 according to ea_history.html:
Added support for MySQL ENUM and SET datatypes for generating DDL.
Unfortunately I am not able to find a way how to create ENUM column in a table. The default set of MySQL column types does not contain ENUM type. So I had to add it using the Database Datatypes dialog. After doing this I could select the ENUM type for a column in the column properties dialog, but I do not know how to define possible ENUM values.
With a "plain" ENUM definition EA generates DDL in the form:
CREATE TABLE sometable (
...
some_column ENUM NOT NULL,
...
) ;
But I would like to get something like:
CREATE TABLE sometable (
...
some_column ENUM('val1', 'val2', ...,'valN') NOT NULL,
...
) ;
Any suggestions? I am using EA 6.1.788 on the Linux OS.
-
Add the ENUM datatype.
Create a column with the ENUM datatype.
Add the values in the Initial: field for that column... eg. 'A','B','C'
Generate the DDL.