Project

General

Profile

Actions

Defect #21123

closed

Extend a content_type field for Attachment

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

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Attachments
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
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.

Actions #1

Updated by Toshi MARUYAMA about 9 years ago

  • Tracker changed from Patch to Feature
Actions #2

Updated by Toshi MARUYAMA about 9 years ago

  • Tracker changed from Feature to Defect
  • Target version set to 3.2.0
Actions #3

Updated by Toshi MARUYAMA about 9 years ago

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

Actions #4

Updated by Toshi MARUYAMA about 9 years ago

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

Actions #5

Updated by Toshi MARUYAMA about 9 years ago

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

Actions #6

Updated by Toshi MARUYAMA about 9 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.

Actions #7

Updated by Toshi MARUYAMA about 9 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.

Actions #8

Updated by Ivan Zabrovskiy about 9 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!

Actions #9

Updated by Toshi MARUYAMA almost 9 years ago

  • Status changed from Resolved to Closed

Thank you for your feedback.

Actions

Also available in: Atom PDF