Project

General

Profile

Actions

Defect #21123

closed

Extend a content_type field for Attachment

Defect #21123: Extend a content_type field for Attachment

Added by Ivan Zabrovskiy about 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
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.

Updated by Toshi MARUYAMA almost 11 years ago Actions #1

  • Tracker changed from Patch to Feature

Updated by Toshi MARUYAMA almost 11 years ago Actions #2

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

Updated by Toshi MARUYAMA almost 11 years ago Actions #3

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

Updated by Toshi MARUYAMA almost 11 years ago Actions #4

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

Updated by Toshi MARUYAMA almost 11 years ago Actions #5

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

Updated by Toshi MARUYAMA almost 11 years ago Actions #6

  • 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.

Updated by Toshi MARUYAMA almost 11 years ago Actions #7

Toshi MARUYAMA wrote:

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

On new MySQL database.

Updated by Ivan Zabrovskiy almost 11 years ago Actions #8

  • 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!

Updated by Toshi MARUYAMA almost 11 years ago Actions #9

  • Status changed from Resolved to Closed

Thank you for your feedback.

Actions

Also available in: PDF Atom