From 448911f3e0c6eba173b1e08414f80c681eccfad7 Mon Sep 17 00:00:00 2001 From: Watheq Alshowaiter Date: Mon, 15 Jul 2024 11:19:51 +0300 Subject: [PATCH] fix: exclude fields when default = 0 in sqlite --- src/RequiredFields.php | 2 +- todos.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RequiredFields.php b/src/RequiredFields.php index 08165b8..fcf170e 100644 --- a/src/RequiredFields.php +++ b/src/RequiredFields.php @@ -64,7 +64,7 @@ private static function getRequiredFieldsForSqlite(): array return collect($queryResult) ->reject( fn ($column) => $column['pk'] - || $column['dflt_value'] + || $column['dflt_value'] != null || ! $column['notnull'] ) ->pluck('name') diff --git a/todos.md b/todos.md index 9f0abd6..17e2e32 100644 --- a/todos.md +++ b/todos.md @@ -12,7 +12,7 @@ - [ ] try previous versions of laravel until laravel 6 - [x] 11 => sqlite, mysql/mariadb(1st party supported in Laravel 11), postgres - [x] 10 => sqlite, mysql, postgres - - [ ] 9 => + - [ ] 9 => sqlite, mysql, postgres - [ ] 8 => - [ ] 7 => - [ ] 6 =>