修正sqlite驱动

This commit is contained in:
thinkphp
2015-12-11 21:36:44 +08:00
parent ca86ee8007
commit 774736f41c

View File

@@ -43,13 +43,13 @@ class Sqlite extends Driver
$info = [];
if ($result) {
foreach ($result as $key => $val) {
$info[$val['field']] = [
'name' => $val['field'],
$info[$val['name']] = [
'name' => $val['name'],
'type' => $val['type'],
'notnull' => (bool) ('' === $val['null']), // not null is empty, null is yes
'default' => $val['default'],
'primary' => (strtolower($val['dey']) == 'pri'),
'autoinc' => (strtolower($val['extra']) == 'auto_increment'),
'notnull' => (bool) (1 === $val['notnull']),
'default' => $val['dflt_value'],
'primary' => '1' == $val['pk'],
'autoinc' => false,
];
}
}