Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Can't create ENUM('html','text','cms') ... Heidi makes Columntype TEXT ?

jprinzler's profile image jprinzler posted 5 years ago in General Permalink
Hello !

When i make a sample table with follow command:

CREATE TABLE `Test` (`aenum` ENUM('html','text','cms') NOT NULL DEFAULT 'text') COLLATE='latin1_swedish_ci' ENGINE=MyISAM;

Then Heide makes the column "aenum" type toi "TEXT" ?
Change does not work either.

On console a:

ALTER TABLE `Test` CHANGE COLUMN `aenum` `aenum` ENUM('html','text','cms') NOT NULL DEFAULT 'text';

is working. ?


My colleague has version 6, since it still works.



...Mhhhh
jfalch's profile image jfalch posted 5 years ago Permalink
what version of heidisql are you using ?
jprinzler's profile image jprinzler posted 5 years ago Permalink
Sorry i forgot... Version 8.3.0.4814 the newest...
Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
ansgar's profile image ansgar posted 5 years ago Permalink
Oh, I can confirm that. Will check that. Must have been introduced with the latest changes for PostgreSQL data types.
jprinzler's profile image jprinzler posted 5 years ago Permalink
Not so bad! It is a great program !!!
ansgar's profile image ansgar posted 5 years ago Permalink
I think the DEFAULT 'text' column makes HeidiSQL detect that column as TEXT type. ENUM columns with a different default value do not have this problem.
Code modification/commit from ansgar.becker, 5 years ago, revision 4815
Restrict regular expression in TDBConnection.GetDatatypeByName to very left characters, so it does not detect "ENUM('text','...') DEFAULT 'text'" columns as TEXT type. See http://www.heidisql.com/forum.php?t=16271
ansgar's profile image ansgar posted 5 years ago Permalink
Fixed in r4815.

Interesting bug. Should also have raised on an
ENUM('int','...')
or
ENUM('varchar','...')

Please login to leave a reply, or register at first.