Commit 69f1bd41 authored by meus's avatar meus

removed notice error when running tests

parent a903c927
...@@ -272,7 +272,9 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict ...@@ -272,7 +272,9 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict
$default = $autoinc = ''; $default = $autoinc = '';
$type = $this->getNativeDeclaration($field); $type = $this->getNativeDeclaration($field);
if (isset($field['autoincrement']) && $field['autoincrement']) { $autoincrement = isset($field['autoincrement']) && $field['autoincrement'];
if ($autoincrement){
$autoinc = ' PRIMARY KEY AUTOINCREMENT'; $autoinc = ' PRIMARY KEY AUTOINCREMENT';
$type = 'INTEGER'; $type = 'INTEGER';
} elseif (array_key_exists('default', $field)) { } elseif (array_key_exists('default', $field)) {
...@@ -289,7 +291,7 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict ...@@ -289,7 +291,7 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict
$notnull = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : ''; $notnull = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : '';
// sqlite does not support unsigned attribute for autoinremented fields // 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); $name = $this->conn->quoteIdentifier($name, true);
return $name . ' ' . $type . $unsigned . $default . $notnull . $autoinc; return $name . ' ' . $type . $unsigned . $default . $notnull . $autoinc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment