From 7938ec333cc1594f9288a7c0d0f86e5cedeb1a60 Mon Sep 17 00:00:00 2001 From: tamagoage Date: Mon, 28 Apr 2025 17:06:56 +0900 Subject: [PATCH] fix: foreign key defined --- src/Parser/CreateTableParser.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Parser/CreateTableParser.php b/src/Parser/CreateTableParser.php index 6d24a881..e2988593 100644 --- a/src/Parser/CreateTableParser.php +++ b/src/Parser/CreateTableParser.php @@ -373,7 +373,11 @@ private static function parseFieldOrKey(array &$tokens, array &$fields, array &$ $indexes[] = $index; return; case 'CHECK': - return; + case 'FOREIGN KEY': + // TODO: Implement full parsing logic for FOREIGN KEY constraints. + // Currently, we are just skipping/ignoring the constraint to avoid + // the "Unsupported field type: (" parser error. + return; // Ignore the constraint for now } $fields[] = static::parseField($tokens);