Book a Demo

Author Topic: Missing ENUM and SET support for MySQL  (Read 3451 times)

helmut

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
  • Helmut Steinke ist hier
    • View Profile
Missing ENUM and SET support for MySQL
« on: January 07, 2005, 06:14:50 am »
Hello,
in the release notes for build 740 I read that there was added support for ENUM and SET for MySQL databases. In the current build (744) I miss this feature.
Best regards
Helmut Steinke

hd

  • EA Administrator
  • EA User
  • *****
  • Posts: 312
  • Karma: +0/-0
    • View Profile
Re: Missing ENUM and SET support for MySQL
« Reply #1 on: January 09, 2005, 01:56:53 pm »
Once you have opened your model, go to Configuration | Database Datatypes.

Select Product Name: MySQL and add the ENUM and SET datatype here.

The vaues should be entered in the Intial: field of the attributes dialog.  Simply enter what is to appear in the brackets...

'M','F'


helmut

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
  • Helmut Steinke ist hier
    • View Profile
Re: Missing ENUM and SET support for MySQL
« Reply #2 on: January 10, 2005, 08:41:50 am »
Thank you,
it works, but there would be no possibility to specify an initial value of the enum?

Best regards
Helmut Steinke

hd

  • EA Administrator
  • EA User
  • *****
  • Posts: 312
  • Karma: +0/-0
    • View Profile
Re: Missing ENUM and SET support for MySQL
« Reply #3 on: January 10, 2005, 01:48:43 pm »
From MySQL Documention...

ENUM columns always have a default value. If you don't specify a default value, then it will be NULL for columns that can have NULL, otherwise the first enumeration value is used as the default value.

http://dev.mysql.com/doc/mysql/en/constraint_enum.html

Set the first enumeration value as the default.