diff --git a/src/SQLParser.php b/src/SQLParser.php index 921386a..82fa2ad 100644 --- a/src/SQLParser.php +++ b/src/SQLParser.php @@ -601,6 +601,7 @@ function parse_field($tokens){ case 'MEDIUMBLOB': case 'LONGBLOB': case 'JSON': + case 'UUID': case 'GEOMETRY': case 'POINT': case 'LINESTRING': diff --git a/tests/FieldTest.php b/tests/FieldTest.php index af15803..037c3ba 100644 --- a/tests/FieldTest.php +++ b/tests/FieldTest.php @@ -27,6 +27,7 @@ function testSimpleFields(){ # MEDIUMBLOB # LONGBLOB # JSON + # UUID $tbl = $this->get_first_table("CREATE TABLE foo (bar DATE)"); $this->assertEquals($tbl['fields'], array( @@ -35,6 +36,14 @@ function testSimpleFields(){ 'type' => "DATE", ) )); + + $tbl = $this->get_first_table("CREATE TABLE foo (bar UUID)"); + $this->assertEquals($tbl['fields'], array( + array( + 'name' => "bar", + 'type' => "UUID", + ) + )); } function testInts(){