Defect #21123

Extend a content_type field for Attachment

Added by Ivan Zabrovskiy over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Attachments
Target version:-
Resolution: Affected version:

Description

Now content_type field has 30 symbols limit. In case of using Attachment for custom models this limitation is very uncomfortable. For example, if I have a model into module, then full name of model always will be greater then 30 symbols. Moreover for this type of models Attachment will be saved without warnings or errors. But cuntent_type will be cuted and record become invalid.

Same thing can happens with disk_filename, which has 255 limit. But in this case situation can by fixed by moving of Redmine directory closer to root of file system.

History

#1 Updated by Toshi MARUYAMA over 3 years ago

  • Tracker changed from Patch to Feature

#2 Updated by Toshi MARUYAMA over 3 years ago

  • Tracker changed from Feature to Defect
  • Target version set to 3.2.0

#3 Updated by Toshi MARUYAMA over 3 years ago

I see attachment.content_type is varchar(30) on MySQL.
But, r739 and r1222 changed limits.
Bug of migration?

#4 Updated by Toshi MARUYAMA over 3 years ago

r1222 auth_sources.account is varchar(30), too.

#5 Updated by Toshi MARUYAMA over 3 years ago

But r1222 changesets.committer is varchar(255).
I don't know why?

#6 Updated by Toshi MARUYAMA over 3 years ago

  • Target version deleted (3.2.0)

I ran "rake db:migrate" on Ruby 1.9.3 MySQL at 2.6-stable r14890.
attachment.content_type, auth_sources.account and changesets.committer are varchar(255).
It seems bug of rails or mysql adapter in old version.

#7 Updated by Toshi MARUYAMA over 3 years ago

Toshi MARUYAMA wrote:

I ran "rake db:migrate" on Ruby 1.9.3 MySQL at 2.6-stable r14890.

On new MySQL database.

#8 Updated by Ivan Zabrovskiy over 3 years ago

  • Status changed from New to Resolved

You right. All this fields has a 255 limit. My apologies. Looks like this is my fault during Redmine installation. Thanks for help!

#9 Updated by Toshi MARUYAMA over 3 years ago

  • Status changed from Resolved to Closed

Thank you for your feedback.

Also available in: Atom PDF