mariaDB JSON support in Laravel

独自空忆成欢 提交于 2019-11-28 12:22:50
ybr-nx

MariaDB has alias for JSON datatype since version 10.2.7

Add MariaDB JSON to Laravel with this package

Note that the 1064 complained about the datatype "json". Such is not (yet) implemented in MariaDB.

You can get close with Dynamic Columns, which at least has a way of fetching them into JSON syntax.

Another thing (probably what you are referring to) is CONNECT being able to have a JSON table type. (Not column type.)

MySQL 5.7 has a datatype called JSON, plus a bunch of functions to manipulate such.

Figured out a simple workaround (not recommended for production) -

As per mariadb version 10.1.32 and lower it seems like mariadb does not support json data type I am still unsure if it is available in version 10.2.7+.

but here's a simple workaround to get through this.

change json data type into text and then run your migration again.

(https://user-images.githubusercontent.com/27993070/41234555-19c5d1d8-6dbf-11e8-9a4b-0644b03aecfc.png)

source- https://github.com/laravel/framework/issues/13622

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!