小编emp*_*mpr的帖子

带有mysql的Rails“列'special_info'的未知类型'json'”

我已经用mysql(5.7.16)数据库创建了Rails(3.2)应用程序。我在某些表中使用了json列,并且工作正常。但是我可以在schema.rb文件中看到一些注释的代码,例如以下代码

# Could not dump table "shopping_cart_precheckout_details" because of following StandardError
# Unknown type 'json' for column 'special_info'
Run Code Online (Sandbox Code Playgroud)

移民

class CreateShoppingCartItemSpecialInfos < ActiveRecord::Migration
  def change
    create_table :shopping_cart_item_special_infos do |t|
      t.integer :shopping_cart_checkout_option_id
      t.column :special_info, :json

      t.timestamps
    end
  end
end
Run Code Online (Sandbox Code Playgroud)

这会影响生产环境吗?为什么将此注释代码添加到schema.rb文件中?

mysql json ruby-on-rails

5
推荐指数
1
解决办法
530
查看次数

如何将购买的主题与rails 5应用程序集成?

我从themeforst购买了flatkit主题,但我不知道如何将购买的主题与rails 5应用程序集成?

themes ruby-on-rails integrate

3
推荐指数
1
解决办法
802
查看次数

标签 统计

ruby-on-rails ×2

integrate ×1

json ×1

mysql ×1

themes ×1