I am running local MySQL
instance version of 5.7.23
in Ubuntu-18-04
. The DB is already having some tables having JSON fields to store JSON
data. They working fine with insert, update and delete operations.
The issue comes when try to modify an existing table to have a new field to store JSON data. MySQL-Workbench
is giving an error saying
Type not supported
The JSON data is not available before MySQL 5.7.8. In order to use it, first set the version for your model to 5.7.8 or higher
Following screen shots shows my local environment information.
The error:
MySQL server info:
MySQL Workbench info:
As of MySQL 5.7. 8, MySQL supports a native JSON data type defined by RFC 7159 that enables efficient access to data in JSON (JavaScript Object Notation) documents.
MySQL version 5.7. 8 introduces a JSON data type that allows you to access data in JSON documents. SQL databases tend to be rigid in design.
Yes , you can definitely to it using JSON_EXTRACT() function in mysql.
I was able to figure the issue. The default version set for Modeling MySQL was set as 5.6.30. Changed it to 5.7.8 and works the table schema modification.
Go to Edit
-> Preferences...
in MySQL Workbench
Refer the below screens:
Before:
After:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With