mirror of https://github.com/AMT-Cheif/drift.git
Don't crash when analyzing incomplete CREATE TABLE statement (#578)
This commit is contained in:
parent
4d463dd145
commit
9bb83605e9
|
@ -35,6 +35,8 @@ class CreateTableReader {
|
|||
span: stmt.tableNameToken.span,
|
||||
message: 'Could not extract schema information for this table: $e',
|
||||
));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
final foundColumns = <String, MoorColumn>{};
|
||||
|
|
|
@ -63,7 +63,10 @@ class MoorParser {
|
|||
}
|
||||
|
||||
for (final reader in createdReaders) {
|
||||
createdEntities.add(await reader.extractTable(step.mapper));
|
||||
final moorTable = await reader.extractTable(step.mapper);
|
||||
if (moorTable != null) {
|
||||
createdEntities.add(moorTable);
|
||||
}
|
||||
}
|
||||
|
||||
final analyzedFile = ParsedMoorFile(
|
||||
|
|
Loading…
Reference in New Issue