Skip to content

Commit 7938ec3

Browse files
committed
fix: foreign key defined
1 parent 839b2fb commit 7938ec3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Parser/CreateTableParser.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,11 @@ private static function parseFieldOrKey(array &$tokens, array &$fields, array &$
373373
$indexes[] = $index;
374374
return;
375375
case 'CHECK':
376-
return;
376+
case 'FOREIGN KEY':
377+
// TODO: Implement full parsing logic for FOREIGN KEY constraints.
378+
// Currently, we are just skipping/ignoring the constraint to avoid
379+
// the "Unsupported field type: (" parser error.
380+
return; // Ignore the constraint for now
377381
}
378382

379383
$fields[] = static::parseField($tokens);

0 commit comments

Comments
 (0)