2013-05-03 86 views
1

我建立了一个刮板,它似乎不像我的描述长度。我将列更改为varchar(500),但没有骰子。我想我需要转换为文本,但我不知道如何。这对我来说有意义吗?谢谢!mysql- Mysql2 ::错误:数据太长,无法在列1'列'描述

错误 -

Mysql2::Error: Data too long for column 'description' at row 1: INSERT INTO sammiches (country , created_at , description , image , name , updated_at) VALUES ('Italy', '2013-05-03 01:10:08', 'In Italy, panino is the word for a sandwich made from bread other than sliced bread, in which case Italians call it a tramezzino or porco. Examples of bread types used are ciabatta, rosetta and baguette. The bread is cut horizontally and filled with deli ingredients such as salami, ham, cheese, mortadella, or other food, and sometimes served warm after having been pressed by a warming grill. In the United States, United Kingdom and Canada, the term panini has been adopted to refer to a pressed and toasted sandwich; there is widespread availability and use of sandwich presses, often known as \"panini presses\" or \"toasted sandwich makers.\"', '/wiki/File:Italian_Sandwich.jpeg', 'Panini', '2013-05-03 01:10:08') (ActiveRecord::StatementInvalid)

回答

4

你的长度是现在约650个字符。尝试增加更多。

+0

我改成了文字,它似乎工作,遗憾的过早的问题。 – DynastySS 2013-05-03 01:18:01