#1407: Regression: enum are VARCHAR in MySQL
-------------------------+--------------------------------------------------
  Reporter:  colnector   |       Owner:  jwage                
      Type:  defect      |      Status:  new                  
  Priority:  critical    |   Milestone:  New                  
 Component:  Attributes  |     Version:  1.0                  
Resolution:              |    Keywords:                       
  Has_test:  0           |    Mystatus:  Pending Core Response
 Has_patch:  0           |  
-------------------------+--------------------------------------------------
Changes (by colnector):

  * priority:  minor => critical
  * summary:  Regression: default values for enum => Regression: enum are
              VARCHAR in MySQL

Old description:

> Regression: upgrade from v0.11 to 1.0rc2 broke my schema.
> consider this column:
> {{{
>     email_state:
>       values:
>         - Unknown
>         - Verified
>         - Disabled
>       default: Unknown
>       notnull: true
>       type: enum(1)
> }}}
>
> Which worked well before and now produces the error:
> {{{  SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid
> default value
> for 'email_state'. Failing Query: CREATE TABLE ...
> email_state VARCHAR(1) DEFAULT 'Unknown' NOT NULL, ...
> }}}

New description:

 I've upgraded from v0.11 to v1.0RC2
 Seems now enums are converted to VARCHAR in MySQL!

 This is excruciatingly wasteful of db resources and against all logic of
 using enumerated types. Instead of 1 byte per object/row, it's now 256
 bytes!

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1407#comment:1>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to