Book a Demo

Author Topic: Cant create enumration in ddl for mysql  (Read 3084 times)

NPRADEEP

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Cant create enumration in ddl for mysql
« on: October 05, 2009, 02:56:02 pm »
I have package called customerInfo in which i have table
called customer and enum as customerkind

CREATE TABLE Customer
(
      CustomerAgreements INTEGER NULL,
      EndDeviceAssets INTEGER NULL,
      ErpPersons INTEGER NULL,

      kind CustomerKind NULL,

      OutageNotifications INTEGER NULL,
      PlannedOutage INTEGER NULL,
      pucNumber VARCHAR(50) NULL,
      specialNeed VARCHAR(50) NULL,
      status INTEGER NULL,
      vip SMALLINT NULL,
      Works INTEGER NULL,
      customerID INTEGER NOT NULL,
      PRIMARY KEY (customerID),
      KEY (kind),
      KEY (customerID)
) ;

enumaration
========
CustomerKind ("Residental","Internal Use");


My problem is when i try to "generare DDL", it just creates
table called customer in which field name  "kind" and datatype as customerKind as show above but dosnt create enumartion, Where as
it must have to created something like below atleast.


CREATE TABLE Customer
(
      CustomerAgreements INTEGER NULL,
      EndDeviceAssets INTEGER NULL,
      ErpPersons INTEGER NULL,
      kind enum("Residental","Internal Use") NULL,
      OutageNotifications INTEGER NULL,
      PlannedOutage INTEGER NULL,
      pucNumber VARCHAR(50) NULL,
      specialNeed VARCHAR(50) NULL,
      status INTEGER NULL,
      vip SMALLINT NULL,
      Works INTEGER NULL,
      customerID INTEGER NOT NULL,
      PRIMARY KEY (customerID),
      KEY (kind),
      KEY (customerID)
) ;

so please advice how to generate DDL with enums for MYSQL.