1
0
mirror of synced 2024-12-13 14:56:01 +03:00

removed notice error when running tests

This commit is contained in:
meus 2007-08-10 20:29:07 +00:00
parent a903c927c4
commit 69f1bd41bb

View File

@ -272,7 +272,9 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict
$default = $autoinc = '';
$type = $this->getNativeDeclaration($field);
if (isset($field['autoincrement']) && $field['autoincrement']) {
$autoincrement = isset($field['autoincrement']) && $field['autoincrement'];
if ($autoincrement){
$autoinc = ' PRIMARY KEY AUTOINCREMENT';
$type = 'INTEGER';
} elseif (array_key_exists('default', $field)) {
@ -289,7 +291,7 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict
$notnull = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : '';
// sqlite does not support unsigned attribute for autoinremented fields
$unsigned = (isset($field['unsigned']) && $field['unsigned'] && ! $field['autoincrement']) ? ' UNSIGNED' : '';
$unsigned = (isset($field['unsigned']) && $field['unsigned'] && !$autoincrement) ? ' UNSIGNED' : '';
$name = $this->conn->quoteIdentifier($name, true);
return $name . ' ' . $type . $unsigned . $default . $notnull . $autoinc;