#1443: Doctrine_Template_Versionable->setUp() has errors
--------------------------+-------------------------------------------------
  Reporter:  nodkz        |       Owner:  jwage                   
      Type:  defect       |      Status:  new                     
  Priority:  major        |   Milestone:  1.0.2                   
 Component:  Versionable  |     Version:  1.0                     
Resolution:               |    Keywords:  setup, hascolumn, bigint
  Has_test:  0            |    Mystatus:  Pending Core Response   
 Has_patch:  0            |  
--------------------------+-------------------------------------------------
Comment (by nodkz):

 {{{
 class Doctrine_AuditLog{
     public function setTableDefinition()
     {
         ...

         // the version column should be part of the primary key definition
         $this->hasColumn($this->_options['versionColumn'], 'integer', 8,
 array('primary' => true));

         // <----  'integer', 8 <----- here we must have ability to change
 length!!!
     }
 }
 }}}

 I would like offer you add new option for Versionable template:
 {{{
 add _option['versionColumnLength']
 }}}
 [[BR]]
 [[BR]]
 [[BR]]
 [[BR]]


 So we easily can modify '''Doctrine_AuditLog->setTableDefinition()'''

 FROM
 {{{
         ...
         // the version column should be part of the primary key definition
     $this->hasColumn($this->_options['versionColumn'], 'integer', 8,
 array('primary' => true));
 }}}
 TO
 {{{
         ...
         // the version column should be part of the primary key definition
         $this->hasColumn($this->_options['versionColumn'], 'integer',
 $this->_options['versionColumnLength'], array('primary' => true));
 }}}

 [[BR]]
 [[BR]]
 [[BR]]
 [[BR]]


 Easily modify '''Doctrine_Template_Versionable->setUp()'''

 FROM
 {{{
         $this->hasColumn('version', 'integer', 8);
 }}}
 TO
 {{{
         $this->hasColumn('version', 'integer',
 $this->_plugin->getOption('versionColumnLength'));
 }}}
 [[BR]]
 [[BR]]
 [[BR]]
 [[BR]]


 And modify '''$_options''' in '''Doctrine_AuditLog'''

 FROM
 {{{
 class Doctrine_AuditLog extends Doctrine_Record_Generator
 {
     protected $_options = array(
                             'className'     => '%CLASS%Version',
                             'versionColumn' => 'version',
                             'tableName'     => false,
                             'generateFiles' => false,
                             'table'         => false,
                             'pluginTable'   => false,
                             'children'      => array(),
                             'auditLog'      => true,
                             );
 }}}
 TO
 {{{
 class Doctrine_AuditLog extends Doctrine_Record_Generator
 {
     protected $_options = array(
                             'className'     => '%CLASS%Version',
                             'versionColumn' => 'version',
                             'tableName'     => false,
                             'generateFiles' => false,
                             'table'         => false,
                             'pluginTable'   => false,
                             'children'      => array(),
                             'auditLog'      => true,
                             'versionColumnLength'=> 8
                             );
 }}}

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1443#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