For MySql map @DbJson to mysql JSON db type

This commit is contained in:
rob bygrave
2020-01-10 14:39:55 +13:00
parent fa3de7158e
commit f6e45a6999
3 changed files with 22 additions and 20 deletions
@@ -65,6 +65,8 @@ public class MySqlPlatform extends DatabasePlatform {
dbTypeMap.put(DbType.BLOB, new MySqlBlob());
dbTypeMap.put(DbType.BINARY, new DbPlatformType("binary", 255));
dbTypeMap.put(DbType.VARBINARY, new DbPlatformType("varbinary", 255));
dbTypeMap.put(DbType.JSON, new DbPlatformType("json", false));
dbTypeMap.put(DbType.JSONB, new DbPlatformType("json", false));
}
@Override
+19 -19
View File
@@ -1,4 +1,4 @@
-- Generated by ebean unknown at 2020-01-10T01:11:55.722473Z
-- Generated by ebean unknown at 2020-01-10T01:29:41.798461Z
create table asimple_bean (
id bigint auto_increment not null,
name varchar(255),
@@ -982,10 +982,10 @@ create table ebasic_hstore (
create table ebasic_json_jackson (
id bigint auto_increment not null,
name varchar(255),
value_set varchar(700),
value_list longtext,
value_map varchar(700),
plain_value varchar(500),
value_set json,
value_list json,
value_map json,
plain_value json,
version bigint not null,
constraint pk_ebasic_json_jackson primary key (id)
);
@@ -993,10 +993,10 @@ create table ebasic_json_jackson (
create table ebasic_json_jackson2 (
id bigint auto_increment not null,
name varchar(255),
value_set varchar(700),
value_list longtext,
value_map varchar(700),
plain_value varchar(500),
value_set json,
value_list json,
value_map json,
plain_value json,
version bigint not null,
constraint pk_ebasic_json_jackson2 primary key (id)
);
@@ -1004,11 +1004,11 @@ create table ebasic_json_jackson2 (
create table ebasic_json_list (
id bigint auto_increment not null,
name varchar(255),
bean_set varchar(700),
bean_list longtext,
bean_map varchar(700),
plain_bean varchar(500),
flags varchar(50),
bean_set json,
bean_list json,
bean_map json,
plain_bean json,
flags json,
tags varchar(100),
version bigint not null,
constraint pk_ebasic_json_list primary key (id)
@@ -1017,7 +1017,7 @@ create table ebasic_json_list (
create table ebasic_json_map (
id bigint auto_increment not null,
name varchar(255),
content longtext,
content json,
version bigint not null,
constraint pk_ebasic_json_map primary key (id)
);
@@ -1042,7 +1042,7 @@ create table ebasic_json_map_detail (
id bigint auto_increment not null,
owner_id bigint,
name varchar(255),
content longtext,
content json,
version bigint not null,
constraint pk_ebasic_json_map_detail primary key (id)
);
@@ -1050,7 +1050,7 @@ create table ebasic_json_map_detail (
create table ebasic_json_map_json_b (
id bigint auto_increment not null,
name varchar(255),
content longtext,
content json,
version bigint not null,
constraint pk_ebasic_json_map_json_b primary key (id)
);
@@ -1066,7 +1066,7 @@ create table ebasic_json_map_varchar (
create table ebasic_json_node (
id bigint auto_increment not null,
name varchar(255),
content longtext,
content json,
version bigint not null,
constraint pk_ebasic_json_node primary key (id)
);
@@ -1082,7 +1082,7 @@ create table ebasic_json_node_blob (
create table ebasic_json_node_json_b (
id bigint auto_increment not null,
name varchar(255),
content longtext,
content json,
version bigint not null,
constraint pk_ebasic_json_node_json_b primary key (id)
);
+1 -1
View File
@@ -1,4 +1,4 @@
-- Generated by ebean unknown at 2020-01-10T01:11:55.722473Z
-- Generated by ebean unknown at 2020-01-10T01:29:41.798461Z
alter table bar drop foreign key fk_bar_foo_id;
drop index ix_bar_foo_id on bar;