mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
修正sqlite驱动
This commit is contained in:
@@ -43,13 +43,13 @@ class Sqlite extends Driver
|
|||||||
$info = [];
|
$info = [];
|
||||||
if ($result) {
|
if ($result) {
|
||||||
foreach ($result as $key => $val) {
|
foreach ($result as $key => $val) {
|
||||||
$info[$val['field']] = [
|
$info[$val['name']] = [
|
||||||
'name' => $val['field'],
|
'name' => $val['name'],
|
||||||
'type' => $val['type'],
|
'type' => $val['type'],
|
||||||
'notnull' => (bool) ('' === $val['null']), // not null is empty, null is yes
|
'notnull' => (bool) (1 === $val['notnull']),
|
||||||
'default' => $val['default'],
|
'default' => $val['dflt_value'],
|
||||||
'primary' => (strtolower($val['dey']) == 'pri'),
|
'primary' => '1' == $val['pk'],
|
||||||
'autoinc' => (strtolower($val['extra']) == 'auto_increment'),
|
'autoinc' => false,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user