Opened 18 years ago

Closed 17 years ago

#3588 closed (duplicate)

increase length of FileField, FilePathField, ImageField from varchar(100)

Reported by: midfield <midfield@…> Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords: FileField FilePathField ImageField
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

If you run into long file names and / or paths, this is an onerous restriction. Please make FileField, FilePathField, ImageField use varchar(maxlength).

Attachments (3)

3588-filefield_maxlength.patch (4.5 KB ) - added by Robert Myers <myer0052@…> 18 years ago.
3588-filefield_maxlength_2.patch (4.5 KB ) - added by Robert Myers <myer0052@…> 18 years ago.
3588-filefield_unlimited.patch (4.4 KB ) - added by Chaiwat S. <cwt@…> 18 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by Robert Myers <myer0052@…>, 18 years ago

Triage Stage: UnreviewedAccepted

This restriction does seem rather limiting.

by Robert Myers <myer0052@…>, 18 years ago

by Robert Myers <myer0052@…>, 18 years ago

comment:2 by Robert Myers <myer0052@…>, 18 years ago

Has patch: set
Triage Stage: AcceptedReady for checkin

I have changed the creation files to make the FileField, FilePathField, and ImageField to be varchar(255). Which is the max length of filenames for Fat/Ext2/Ext3 and also the limit for varchar in Mysql < 5.0.3

Also I noticed the oracle Slugfield was hardcoded to 50 I changed it to varchar2(%(maxlength)s) which is the same as the other backends.

comment:3 by midfield@…, 18 years ago

while 255 is the maximum length for a filename, FileField et al has to potetially store entire paths to files, which can easily get longer than 255. so this is a minor vote again for varchar(maxlength) for FileFields et al.

comment:4 by Simon G. <dev@…>, 18 years ago

Summary: FileField, FilePathField, ImageField shouldn't be varchar(100)increase length of FileField, FilePathField, ImageField from varchar(100)

by Chaiwat S. <cwt@…>, 18 years ago

comment:5 by Chaiwat S. <cwt@…>, 18 years ago

I think it should be better if we change to 'text' to support path + filename.
So I create a patch base on 3588-filefield_maxlength_2.patch, but change to 'text' or something like 'TextField'.

comment:6 by Malcolm Tredinnick, 18 years ago

Needs documentation: set
Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

Part of fixing this bug includes writing up instructions for how to port existing models to the changed versions. These are the instructions that will go on the [BackwardsIncompatibleChanges] wiki page.

So, in addition to updating the patch to include the postgresql_psycopg2 backend, can people please start working out how to move models across to this new version for each of our supported databases (MySQL, PostgreSQL and SQLite). For bonus points, work out the Oracle version as well, but we can probably ask the Oracle Boulder Sprinters group for help with that.

comment:7 by James Bennett, 17 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #5361.

Note: See TracTickets for help on using tickets.
Back to Top