1
0
mirror of synced 2024-12-14 07:06:04 +03:00

fixed autoinc field handling for unsigned attribute

This commit is contained in:
zYne 2007-03-27 19:38:34 +00:00
parent 990b6c666e
commit 0770450d5b

View File

@ -283,7 +283,9 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict
*/
$notnull = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : '';
$unsigned = (isset($field['unsigned']) && $field['unsigned']) ? ' UNSIGNED' : '';
// sqlite does not support unsigned attribute for autoinremented fields
$unsigned = (isset($field['unsigned']) && $field['unsigned'] && ! $field['autoincrement']) ? ' UNSIGNED' : '';
$name = $this->conn->quoteIdentifier($name, true);
return $name . ' ' . $type . $unsigned . $default . $notnull . $autoinc;