Error: Data too long for column "story_html"

738 Views Asked by At

I am using gem "audited-activerecord", i have a column called "story_html" in a table and it saves the html5 contents.

when i update the "story_html", i get the following error:-

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    
1

There are 1 best solutions below

1
On

Increase the length of the column story_html in your MySQL table mobile_apps to a maximum value that you need. Or change it to text datatype since your content looks very long.