Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I append more elements to an ENUM-type in MySQL Workbench?

As the title suggests, i'm trying to add more elements to my existing ENUM-type column. I'm using MySQL Workbench 6.3 for my database.

CREATE TABLE `quantum` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `type` enum('a','b','c','d','e') CHARACTER SET latin1 NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11173 DEFAULT CHARSET=utf8;

then I try to alter type column to add another element f

ALTER TABLE quantum
MODIFY COLUMN type enum('a','b','c','d','e','f') NOT NULL

then MySQL Workbench 6.3 is giving me some weird error

enter image description here

like image 682
Hard Spocker Avatar asked Sep 13 '25 19:09

Hard Spocker


2 Answers

Are you sure you have the latest version of MySQL Workbench. I don't see this problem in the current one (6.3.6):

enter image description here

like image 101
Mike Lischke Avatar answered Sep 16 '25 07:09

Mike Lischke


While using enum() datatype in workbench/ mysql. Mysql do not aceept ENUM() with no values/params inside the ENUM().

Use ENUM with some comma separated values :

ENUM('PENDING','SUCCESS','FAIL')

enter image description here

like image 42
Avinash Raut Avatar answered Sep 16 '25 07:09

Avinash Raut