Primary keys are created as unsigned integers so there should be a way of creating unsigned integer fields (for foreign keys etc.):
Line 583, class.MySQLAdapter.php:
if(is_array($options) && array_key_exists('null', $options) && $options['null'] === false) { $sql .= ' NOT NULL'; }
becomes
if(is_array($options) && array_key_exists('unsigned', $options) && $options['unsigned'] === true) { $sql .= ' UNSIGNED'; }
if(is_array($options) && array_key_exists('null', $options) && $options['null'] === false) { $sql .= ' NOT NULL'; }
Line 231, class.MySQLTableDefinition.php:
$opts = array( 'null' => $this->null, 'default' => $this->default );
becomes
$opts = array( 'null' => $this->null, 'default' => $this->default, 'unsigned' => $this->unsigned );
Comment #1
Posted on Feb 29, 2008 by Swift GiraffeThis has been fixed and committed.
Thanks for the feedback.
Comment #2
Posted on Feb 29, 2008 by Swift Giraffe(No comment was entered for this change.)
Status: Fixed
Labels:
Type-Defect
Priority-Medium