Skip to content

Commit 3837827

Browse files
committed
Merge #380 - Fix #351 Support table structure with COMPRESSED columns
Fixes: #351 Pull-request: #380 Signed-off-by: William Desportes <[email protected]>
2 parents 467e5f2 + 54d3b05 commit 3837827

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/Components/CreateDefinition.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ class CreateDefinition extends Component
9191
'INVISIBLE' => 13,
9292
'ENFORCED' => 14,
9393
'NOT' => 15,
94+
'COMPRESSED' => 16,
9495
// Common entries.
9596
//
9697
// NOTE: Some of the common options are not in the same order which

tests/Components/CreateDefinitionTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,12 @@ public function testBuildWithInvisibleKeyword(): void
151151
CreateDefinition::build($parser->statements[0]->fields[0])
152152
);
153153
}
154+
155+
public function testBuildWithCompressed(): void
156+
{
157+
$query = 'CREATE TABLE `user` ( `message2` TEXT COMPRESSED )';
158+
$parser = new Parser($query);
159+
$stmt = $parser->statements[0];
160+
$this->assertEquals("CREATE TABLE `user` (\n `message2` text COMPRESSED\n) ", $stmt->build());
161+
}
154162
}

0 commit comments

Comments
 (0)