File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class SQLiteParser
16
16
private const ENUM_PATTERN = '/check \((?:`|\"| \')?(\w+)(?:`|\"| \')? in \((.+)\)\)/i ' ;
17
17
18
18
private readonly string $ tableName ;
19
- private readonly string $ tableSql ;
19
+ private readonly ? string $ tableSql ;
20
20
private readonly array $ indexesSql ;
21
21
22
22
public function __construct (
@@ -27,15 +27,18 @@ public function __construct(
27
27
$ this ->tableSql = $ connection ->executeQuery (
28
28
sql: self ::TABLE_SQL ,
29
29
params: ['tableName ' => $ tableName ],
30
- )->fetchOne ();
30
+ )->fetchOne () ?: null ;
31
31
$ this ->indexesSql = $ connection ->executeQuery (
32
32
sql: self ::INDEXES_SQL ,
33
33
params: ['tableName ' => $ tableName ],
34
34
)->fetchFirstColumn ();
35
35
}
36
36
37
- public function getSQLTable (): AbstractSQLTable
37
+ public function getSQLTable (): ? AbstractSQLTable
38
38
{
39
+ if (!$ this ->tableSql ) {
40
+ return null ;
41
+ }
39
42
$ columns = $ enums = $ primaryKeys = [];
40
43
$ columnsStarted = false ;
41
44
$ lines = array_map (
You can’t perform that action at this time.
0 commit comments