diff options
author | Gervase Markham <gerv@gerv.net> | 2011-12-08 13:47:39 +0100 |
---|---|---|
committer | Gervase Markham <gerv@mozilla.org> | 2011-12-08 13:47:39 +0100 |
commit | a4599dde03c31fec1000c8358d6daa04e1801139 (patch) | |
tree | 1f01c6e68f1989ab15b782cf1fe388d049ca6389 /Bugzilla/Install | |
parent | 4badf488d539d7e50c7a156ecc65514796e6345a (diff) | |
download | bugzilla-a4599dde03c31fec1000c8358d6daa04e1801139.tar.gz bugzilla-a4599dde03c31fec1000c8358d6daa04e1801139.tar.xz |
Expand max length of attachment filename from 100 to 255 characters. r=glob, a=LpSolit.
https://bugzilla.mozilla.org/show_bug.cgi?id=705078
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r-- | Bugzilla/Install/DB.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index 84267de41..b9f5d112d 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -658,6 +658,10 @@ sub update_table_definitions { # 2011-10-11 miketosh - Bug 690173 _on_delete_set_null_for_audit_log_userid(); + + # 2011-11-23 gerv@gerv.net - Bug 705058 - make filenames longer + $dbh->bz_alter_column('attachments', 'filename', + { TYPE => 'varchar(255)', NOTNULL => 1 }); ################################################################ # New --TABLE-- changes should go *** A B O V E *** this point # @@ -2204,7 +2208,7 @@ sub _convert_attachments_filename_from_mediumtext { # shouldn't be there for security. Buggy browsers include them, # and attachment.cgi now takes them out, but old ones need converting. my $ref = $dbh->bz_column_info("attachments", "filename"); - if ($ref->{TYPE} ne 'varchar(100)') { + if ($ref->{TYPE} ne 'varchar(100)' && $ref->{TYPE} ne 'varchar(255)') { print "Removing paths from filenames in attachments table..."; my $sth = $dbh->prepare("SELECT attach_id, filename FROM attachments " . |