File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
sources/Sql/Ddl/Table/Index Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class IndexType extends SqlEnum
19
19
{
20
20
21
21
public const PRIMARY = Keyword::PRIMARY . ' ' . Keyword::KEY ;
22
- public const UNIQUE = Keyword::UNIQUE . ' ' . Keyword::KEY ; // or INDEX
22
+ public const UNIQUE = Keyword::UNIQUE . ' ' . Keyword::INDEX ;
23
23
public const INDEX = Keyword::INDEX ; // or KEY
24
24
public const FULLTEXT = Keyword::FULLTEXT . ' ' . Keyword::INDEX ; // or KEY
25
25
public const SPATIAL = Keyword::SPATIAL . ' ' . Keyword::INDEX ; // or KEY
@@ -28,12 +28,12 @@ protected static function validateValue(string &$value): bool
28
28
{
29
29
// normalize KEY vs INDEX
30
30
$ value = strtoupper ($ value );
31
- if ($ value === Keyword::UNIQUE . ' ' . Keyword::INDEX ) {
31
+ if ($ value === Keyword::UNIQUE . ' ' . Keyword::KEY ) {
32
32
$ value = self ::UNIQUE ;
33
33
} elseif ($ value === Keyword::FULLTEXT . ' ' . Keyword::KEY ) {
34
34
$ value = self ::FULLTEXT ;
35
35
} elseif ($ value === Keyword::SPATIAL . ' ' . Keyword::KEY ) {
36
- $ value = self ::FULLTEXT ;
36
+ $ value = self ::SPATIAL ;
37
37
} elseif ($ value === Keyword::KEY ) {
38
38
$ value = self ::INDEX ;
39
39
}
You can’t perform that action at this time.
0 commit comments