File tree Expand file tree Collapse file tree 5 files changed +72
-25
lines changed
Expand file tree Collapse file tree 5 files changed +72
-25
lines changed Original file line number Diff line number Diff line change @@ -45,25 +45,25 @@ class Key extends Component
4545 4 ,
4646 'var ' ,
4747 ),
48- 'INVISIBLE ' => 1 ,
49- 'VISIBLE ' => 1 ,
48+ // MariaDB options
49+ 'CLUSTERING ' => array (
50+ 4 ,
51+ 'var= ' ,
52+ ),
5053 'ENGINE_ATTRIBUTE ' => array (
51- 3 ,
54+ 5 ,
5255 'var= ' ,
5356 ),
5457 'SECONDARY_ENGINE_ATTRIBUTE ' => array (
55- 4 ,
58+ 5 ,
5659 'var= ' ,
5760 ),
58-
61+ // MariaDB & MySQL options
62+ 'VISIBLE ' => 6 ,
63+ 'INVISIBLE ' => 6 ,
5964 // MariaDB options
60-
61- 'CLUSTERING ' => array (
62- 4 ,
63- 'var= ' ,
64- ),
65- 'IGNORED ' => 1 ,
66- 'NOT IGNORED ' => 1 ,
65+ 'IGNORED ' => 10 ,
66+ 'NOT IGNORED ' => 10 ,
6767 );
6868
6969 /**
Original file line number Diff line number Diff line change @@ -101,33 +101,33 @@ public function testParseKeyWithLengthWithAllOptions()
101101 $ this ->assertEquals ('alias_type_idx ' , $ component ->name );
102102 $ this ->assertEquals (new OptionsArray (
103103 array (
104- 1 => 'VISIBLE ' ,
104+ 1 => array (
105+ 'name ' => 'KEY_BLOCK_SIZE ' ,
106+ 'equals ' => true ,
107+ 'expr ' => '1 ' ,
108+ 'value ' => '1 ' ,
109+ ),
105110 2 => array (
106111 'name ' => 'USING ' ,
107112 'equals ' => false ,
108113 'expr ' => 'BTREE ' ,
109114 'value ' => 'BTREE ' ,
110115 ),
111- 3 => array (
112- 'name ' => 'ENGINE_ATTRIBUTE ' ,
113- 'equals ' => true ,
114- 'expr ' => '\'foo \'' ,
115- 'value ' => 'foo ' ,
116- ),
117116 4 => array (
118117 'name ' => 'COMMENT ' ,
119118 'equals ' => false ,
120119 'expr ' => '\'my comment \'' ,
121120 'value ' => 'my comment ' ,
122121 ),
123- 12 => array (
124- 'name ' => 'KEY_BLOCK_SIZE ' ,
122+ 5 => array (
123+ 'name ' => 'ENGINE_ATTRIBUTE ' ,
125124 'equals ' => true ,
126- 'expr ' => '1 ' ,
127- 'value ' => '1 ' ,
125+ 'expr ' => '\' foo \' ' ,
126+ 'value ' => 'foo ' ,
128127 ),
129- 13 => 'INVISIBLE ' ,
130- 14 => array (
128+ 6 => 'VISIBLE ' ,
129+ 12 => 'INVISIBLE ' ,
130+ 13 => array (
131131 'name ' => 'SECONDARY_ENGINE_ATTRIBUTE ' ,
132132 'equals ' => true ,
133133 'expr ' => '\'bar \'' ,
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ public function createProvider()
4747 array ('parser/parseCreateTableLike ' ),
4848 array ('parser/parseCreateTableSpatial ' ),
4949 array ('parser/parseCreateTableTimestampWithPrecision ' ),
50+ array ('parser/parseCreateTableWithInvisibleKey ' ),
5051 array ('parser/parseCreateTrigger ' ),
5152 array ('parser/parseCreateUser ' ),
5253 array ('parser/parseCreateView ' ),
Original file line number Diff line number Diff line change 1+ CREATE TABLE `animes_comments` (
2+ `anime_comment_id` bigint unsigned NOT NULL AUTO_INCREMENT,
3+ `anime_id` bigint unsigned NOT NULL,
4+ `user_id` bigint unsigned NOT NULL,
5+ `comment_text` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL,
6+ `comment_at` datetime DEFAULT NULL,
7+ PRIMARY KEY (`anime_comment_id`),
8+ KEY `animes_comments_animes_fk` (`anime_id`) invisible,
9+ KEY `animes_comments_users_fk` (`user_id`),
10+ KEY `comment_at_idx` (`comment_at`) ,
11+ CONSTRAINT `animes_comments_animes_fk` FOREIGN KEY (`anime_id`) REFERENCES `animes` (`anime_id`) ON DELETE CASCADE ON UPDATE RESTRICT,
12+ CONSTRAINT `animes_comments_users_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE RESTRICT)
You can’t perform that action at this time.
0 commit comments