Thank you for the link. Mysql and JSON seems to be a trap for me. Most linux distributions migrate mysql to mariadb these days. Migrate data to mariadb needs an explicit dump and restore of the related tables or you change the type back to t.text in mysql.
t.json doesn't work for me with rails 5.1.4, mysql2 0.4.10, and mariadb 10.2.10. I tried
after migration, schema.rb results in t.text:
I expected t.json. Any ideas?
Wolfgang
With MariaDB, it looks like the JSON data type was introduced in 10.2.7. However, instead of a JSON data type, it creates a LONGTEXT.
https://mariadb.com/kb/en/library/json-data-type/
Thank you for the link. Mysql and JSON seems to be a trap for me. Most linux distributions migrate mysql to mariadb these days. Migrate data to mariadb needs an explicit dump and restore of the related tables or you change the type back to t.text in mysql.
I will go back use t.text an serialize for now.