Skip to content

Commit ed38f16

Browse files
committed
Merge branch 'QA'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2 parents c19fd32 + c158370 commit ed38f16

7 files changed

Lines changed: 2186 additions & 1 deletion

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
- Fix MySQL 8.0 table structure KEY expression not recognized (#347)
9090
- Fix KEY order (ASC/DESC) not part of the KEY definition (#296)
9191
- Fix missing KEY options for MySQL and MariaDB (#348)
92+
- Fix validation error when using ENFORCED option (#341)
9293

9394
## [4.7.2] - 2021-02-05
9495

src/Components/CreateDefinition.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ class CreateDefinition extends Component
8686
'expr',
8787
['parenthesesDelimited' => true],
8888
],
89-
9089
'INVISIBLE' => 13,
90+
'ENFORCED' => 14,
91+
'NOT' => 15,
9192
// Common entries.
9293
//
9394
// NOTE: Some of the common options are not in the same order which

tests/Parser/CreateStatementTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public function createProvider(): array
4949
['parser/parseCreateTableLike'],
5050
['parser/parseCreateTableSpatial'],
5151
['parser/parseCreateTableTimestampWithPrecision'],
52+
['parser/parseCreateTableEnforcedCheck'],
53+
['parser/parseCreateTableNotEnforcedCheck'],
5254
['parser/parseCreateTableWithInvisibleKey'],
5355
['parser/parseCreateTrigger'],
5456
['parser/parseCreateUser'],
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE TABLE IF NOT EXISTS employees_check (FirstName varchar(30) CHECK (FirstName REGEXP '^T' AND FirstName REGEXP 'r$') ENFORCED);

0 commit comments

Comments
 (0)