On Jan 5, 2008, at 11:01 AM, Jess Robinson wrote:
On Sat, 5 Jan 2008, Pedro Melo wrote:
Hi,
I was using Producer::MySQL and noticed that my boolean fields where
getting generated as ENUM's.
Is there any reason for this? MySQL supports BOOLEAN (converts to
TINYINT).
Ah, but since when has it supported Booleans? SQL::T has been around
since
at least mysql 3.x, so it contains some rather old assumptions about
data
types etc.
Assuming this isn't a brand shiney new feature that not many folks are
likely to have yet, please toss us a patch to change it to a
boolean. It
should also include documentation that points out what the previous
behaviour was, and of course appropriately updated tests ;)
Jess
[[ These types are synonyms for TINYINT(1). The synonym BOOLEAN was
added in MySQL 4.1.0. A value of zero is considered false. Non-zero
values are considered true ]]
There you go. So i guess some producer option to switch it back to
either enum mode or to an explicity TINYINT(1) for <= v4.0.x would
also be in order.
Pedro: If you don't happen to have a patch ready by the end of this
evening I might get round to it tomorrow since this is also something
that I'd be interested in.
-ash
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--
sqlfairy-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers