我正在使用gem" audited-activerecord",我有一个名为" story_html"在表格中,它保存了html5内容。
当我更新" story_html"时,我收到以下错误: -
Mysql2::Error: Data too long for column 'story_html' at row 1: UPDATE `mobile_apps` SET `story_html` = ' `story_html` = x'3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e0d0a2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202002020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020203c2f706c6973743e', `updated_at` = '2014-12-08 11:26:07' WHERE `mobile_apps`.`id` = 624
答案 0 :(得分:1)
将MySQL表story_html
中列mobile_apps
的长度增加到您需要的最大值。或者将其更改为text
数据类型,因为您的内容看起来很长。