contao/test — Issue #1088: TL core .sql parser does not honor Fieldtype "enum" (with Patch).
Author: importer
Created: 2011-11-29 07:20:03+00:00
State: open
Labels: Defect, framework, Invalid

I just had to create a database with a field of type enum('foo','bar') which the TL Parser can not handle right now.
The problem is in DB_MySQL*.php around line 138 where the parser tries to handle the return params of the "SHOW COlUMNS" call as precision and length.

The attached patch will detect enum fields and put the result in the "length" section of the result, where the DB Update class expects them to end up.

With the attached patch the enum field is correctly created and passes the DB check and I am pretty confident that it works (but I'd suggest to test it on some other DB servers nontheless).

I have no clue how to implement it in other DB engines and if enum fieldtype is supported there anyway, so maybe someone wants to have a look into that.

Hope this helps

PS: Unsure if this now belongs to core.backend or core.framework, I define it as the latter in lack of a "core.libraries" where it would belong IMO.

[Download the attachments](http://www.contao.org/tl_files/tickets/1088.zip "Download the attachments of this ticket")

--- _Originally created by xtra on October 13th, 2009, at 05:55am (ID 1088)_