Skip to content

Commit 2c3f989

Browse files
authored
Merge pull request #4749 from MGatner/sqlite-nullable
SQLite3 "nullable"
2 parents 1b5f05e + d355030 commit 2c3f989

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

system/Database/SQLite3/Table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ protected function formatFields($fields)
332332
foreach ($fields as $field)
333333
{
334334
$return[$field->name] = [
335-
'type' => $field->type,
336-
'default' => $field->default,
337-
'nullable' => $field->nullable,
335+
'type' => $field->type,
336+
'default' => $field->default,
337+
'null' => $field->nullable,
338338
];
339339

340340
if ($field->primary_key)

tests/system/Database/Live/SQLite/AlterTableTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,17 @@ public function testFromTableFillsDetails()
8383
$this->assertCount(4, $fields);
8484
$this->assertTrue(array_key_exists('id', $fields));
8585
$this->assertNull($fields['id']['default']);
86-
$this->assertTrue($fields['id']['nullable']);
86+
$this->assertTrue($fields['id']['null']);
8787
$this->assertEquals('integer', strtolower($fields['id']['type']));
8888

8989
$this->assertTrue(array_key_exists('name', $fields));
9090
$this->assertNull($fields['name']['default']);
91-
$this->assertFalse($fields['name']['nullable']);
91+
$this->assertFalse($fields['name']['null']);
9292
$this->assertEquals('varchar', strtolower($fields['name']['type']));
9393

9494
$this->assertTrue(array_key_exists('email', $fields));
9595
$this->assertNull($fields['email']['default']);
96-
$this->assertTrue($fields['email']['nullable']);
96+
$this->assertTrue($fields['email']['null']);
9797
$this->assertEquals('varchar', strtolower($fields['email']['type']));
9898

9999
$keys = $this->getPrivateProperty($this->table, 'keys');

0 commit comments

Comments
 (0)