Changeset 4788

Show
Ignore:
Timestamp:
08/22/08 05:10:56 (5 months ago)
Author:
guilhermeblanco
Message:

fixes #1352. Added comment support on integer fields on MySQL.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/lib/Doctrine/DataDict/Mysql.php

    r4778 r4788  
    471471        $notnull  = (isset($field['notnull'])  && $field['notnull'])  ? ' NOT NULL' : ''; 
    472472        $unsigned = (isset($field['unsigned']) && $field['unsigned']) ? ' UNSIGNED' : ''; 
     473        $comment  = (isset($field['comment']) && $field['comment'])  
     474            ? " COMMENT '" . $field['comment'] . "'" : ''; 
    473475 
    474476        $name = $this->conn->quoteIdentifier($name, true); 
    475477 
    476         return $name . ' ' . $this->getNativeDeclaration($field) . $unsigned . $default . $notnull . $autoinc; 
     478        return $name . ' ' . $this->getNativeDeclaration($field) . $unsigned  
     479            . $default . $notnull . $autoinc . $comment; 
    477480    } 
    478481}