Ant*_*682 7 mysql ruby-on-rails ruby-on-rails-5 c9.io
我正在尝试通过运行在MySQL数据库中添加一个json列:
class AddStatisticsToPlayerStatistic < ActiveRecord::Migration[5.0]
def change
add_column :player_statistics, :statistics, :json
end
end
Run Code Online (Sandbox Code Playgroud)
但是当我尝试运行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
Run Code Online (Sandbox Code Playgroud)
有谁知道如何在MySQL Ver 14.14 Distrib 5.5.53中添加JSON列.正常吗?
提前致谢!
归档时间: |
|
查看次数: |
3798 次 |
最近记录: |