在 Heroku 上部署应用,在 pg 数据库中用 text 类型字段保存了很大一段文字,但是仍然报错:
ActiveRecord::StatementInvalid (PG::Error: ERROR: value too long for type character varying(255)
这是怎么回事啊?求解答
create_table "law_details", :force => true do |t|
t.string "pub_date"
t.string "title"
t.string "doc_id"
t.string "summary"
t.string "exec_date"
t.string "pub_dept"
t.string "catalog"
t.text "content"
t.integer "version", :default => 1
t.boolean "visible", :default => true
t.string "action", :default => "add", :null => false
t.integer "law_category_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "law_udid"
end
add_index "law_details", ["law_category_id"], :name => "index_law_details_on_law_category_id"
add_index "law_details", ["title"], :name => "index_law_details_on_title"
add_index "law_details", ["version"], :name => "index_law_details_on_version"