Skip to content

Commit 2baab01

Browse files
committed
Port key detection change from the CMS
1 parent af9c01e commit 2baab01

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Sqlite/SqliteDriver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ public function getTableColumns($table, $typeOnly = true)
184184
// Do some dirty translation to MySQL output.
185185
// TODO: Come up with and implement a standard across databases.
186186
$columns[$field->NAME] = (object) array(
187-
'Field' => $field->NAME,
188-
'Type' => $field->TYPE,
189-
'Null' => ($field->NOTNULL == '1' ? 'NO' : 'YES'),
187+
'Field' => $field->NAME,
188+
'Type' => $field->TYPE,
189+
'Null' => ($field->NOTNULL == '1' ? 'NO' : 'YES'),
190190
'Default' => $field->DFLT_VALUE,
191-
'Key' => ($field->PK == '1' ? 'PRI' : '')
191+
'Key' => ($field->PK != '0' ? 'PRI' : ''),
192192
);
193193
}
194194
}

0 commit comments

Comments
 (0)