Skip to content

Commit 6055277

Browse files
committed
Supporting table structure with COMPRESSED columns
Signed-off-by: Fawzi E. Abdulfattah <[email protected]>
1 parent 7778926 commit 6055277

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/Components/CreateDefinition.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class CreateDefinition extends Component
8888
'INVISIBLE' => 13,
8989
'ENFORCED' => 14,
9090
'NOT' => 15,
91+
'COMPRESSED' => 16,
9192
// Common entries.
9293
//
9394
// NOTE: Some of the common options are not in the same order which

tests/Components/CreateDefinitionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,13 @@ public function testBuildWithInvisibleKeyword()
142142
CreateDefinition::build($parser->statements[0]->fields[0])
143143
);
144144
}
145+
146+
public function testBuildWithCompressed(): void
147+
{
148+
149+
$query = 'CREATE TABLE `user` ( `message2` TEXT COMPRESSED )';
150+
$parser = new Parser($query);
151+
$stmt = $parser->statements[0];
152+
$this->assertEquals("CREATE TABLE `user` (\n `message2` text COMPRESSED\n) ",$stmt->build());
153+
}
145154
}

0 commit comments

Comments
 (0)