From a4599dde03c31fec1000c8358d6daa04e1801139 Mon Sep 17 00:00:00 2001 From: Gervase Markham Date: Thu, 8 Dec 2011 12:47:39 +0000 Subject: Expand max length of attachment filename from 100 to 255 characters. r=glob, a=LpSolit. https://bugzilla.mozilla.org/show_bug.cgi?id=705078 --- Bugzilla/Install/DB.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Install') 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 " . -- cgit v1.2.3-24-g4f1b