我正在尝试通过运行在 MySQL db 中添加一个 json 列:
class AddStatisticsToPlayerStatistic < ActiveRecord::Migration[5.0]
def change
add_column :player_statistics, :statistics, :json
end
end
但是当我尝试运行 rake db:migrate 时出现此错误
Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'json' at line 1: ALTER TABLE `player_statistics` ADD `statistics` json
有谁知道如何在 MySQL Ver 14.14 Distrib 5.5.53 中添加 JSON 列。适当地?
提前致谢!