Defect #21993
closedProjects description cannot contain long text on MySQL
0%
Description
Original migration [1] changes type of projects description from string to text. It means that projects description can contain text longer than 255 bytes.
In acutually, on MySQL, projects desctiption type is changed to text but it limit 255byte.
[1]: source:tags/3.2.0/db/migrate/087_change_projects_description_to_text.rb
Files
Related issues
Updated by Go MAEDA almost 9 years ago
I can store 65535 bytes of text on my installation.
Rails console:
irb(main):001:0> Redmine::VERSION.to_s => "3.2.0.stable.15138" irb(main):002:0> ActiveRecord::Base.connection.adapter_name => "Mysql2" irb(main):003:0> Project.find_by_identifier('test').description.size => 65535
db/schema.rb:
create_table "projects", force: :cascade do |t| t.string "name", limit: 255, default: "", null: false t.text "description", limit: 65535 t.string "homepage", limit: 255, default: "" t.boolean "is_public", default: true, null: false t.integer "parent_id", limit: 4 t.datetime "created_on" t.datetime "updated_on" t.string "identifier", limit: 255 t.integer "status", limit: 4, default: 1, null: false t.integer "lft", limit: 4 t.integer "rgt", limit: 4 t.boolean "inherit_members", default: false, null: false t.integer "slack", limit: 4, default: 0, null: false t.integer "default_version_id", limit: 4 end
Updated by okkez _ almost 9 years ago
My old db/schema.rb is:
create_table "projects", force: :cascade do |t| t.string "name", limit: 255, default: "", null: false t.text "description", limit: 255 t.string "homepage", limit: 255, default: "" t.boolean "is_public", default: true, null: false t.integer "parent_id" t.datetime "created_on" t.datetime "updated_on" t.string "identifier", limit: 255 t.integer "status", default: 1, null: false t.integer "lft" t.integer "rgt" t.boolean "inherit_members", default: false, null: false end
This environment is version up from very old Redmine step by step.
So I don't know why my db/schema.rb has :limit => 255
.
Updated by Toshi MARUYAMA over 8 years ago
- Related to Feature #19869: Consider increasing the size limit of description and note columns for tickets added
Updated by Toshi MARUYAMA about 8 years ago
- Tracker changed from Patch to Defect
- Category changed from Projects to Database
- Status changed from New to Closed
http://stackoverflow.com/questions/3354330/difference-between-string-and-text-in-rails
As I described at #21123#note-6.
I think it is bug of rails or mysql adapter in old version.
We cannot do anything.
Try #20831#note-3.