Skip to content

Commit 83355e8

Browse files
committed
use array type for json in mysql
1 parent f197d6f commit 83355e8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

internal/core/mysql_type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func mysqlType(col *plugin.Column) string {
3535
return "bool"
3636

3737
case "json":
38-
return "string"
38+
return "array"
3939

4040
case "any":
4141
return "mixed"

internal/core/mysql_type_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func TestMysqlType(t *testing.T) {
2020
{"enum", "enum", "string"},
2121
{"date", "date", "\\DateTimeImmutable"},
2222
{"boolean", "boolean", "bool"},
23-
{"json", "json", "string"},
23+
{"json", "json", "array"},
2424
{"any", "any", "mixed"},
2525
{"unknown", "unknown", "mixed"},
2626
}

0 commit comments

Comments
 (0)