summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authorjustdave%syndicomm.com <>2004-02-22 12:03:46 +0100
committerjustdave%syndicomm.com <>2004-02-22 12:03:46 +0100
commitfcee2c5701545b734659640c66051473f565d7aa (patch)
tree288b24d904dea12eef0a32cb426218e5ce44a19d /checksetup.pl
parent6b740b9f365d75fb9765d23a042378d16a3abeb0 (diff)
downloadbugzilla-fcee2c5701545b734659640c66051473f565d7aa.tar.gz
bugzilla-fcee2c5701545b734659640c66051473f565d7aa.tar.xz
[SCHEMA CHANGE] Bug 220232: short_desc field in the bugs table is no longer allowed to be NULL. Null summaries would cause BugMail.pm to crash. (Normally this would only be caused by third party touching of the bugs table, such as bugs manually migrated from another system or inserted by a script - such scripts will now break if they don't set a short_desc)
r= bbaetz, a= justdave
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 2a24ad03c..74151d87c 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -1587,7 +1587,7 @@ $table{bugs} =
bug_status enum("UNCONFIRMED", "NEW", "ASSIGNED", "REOPENED", "RESOLVED", "VERIFIED", "CLOSED") not null,
creation_ts datetime not null,
delta_ts timestamp not null,
- short_desc mediumtext,
+ short_desc mediumtext not null,
op_sys enum($my_opsys) not null,
priority enum($my_priorities) not null,
product_id smallint not null,
@@ -4159,7 +4159,7 @@ if (TableExists('shadowlog')) {
$dbh->do("DROP TABLE shadowlog");
}
-# 2003-04-XX - bugzilla@chimpychompy.org (GavinS)
+# 2003-04-27 - bugzilla@chimpychompy.org (GavinS)
#
# Bug 180086 (http://bugzilla.mozilla.org/show_bug.cgi?id=180086)
#
@@ -4175,6 +4175,12 @@ if (GetFieldDef('votes', 'count')) {
RenameField ('votes', 'count', 'vote_count');
}
+# 2004/02/15 - Summaries shouldn't be null - see bug 220232
+if (GetFieldDef('bugs', 'short_desc')->[2]) { # if it allows nulls
+ $dbh->do("UPDATE bugs SET short_desc = '' WHERE short_desc IS NULL");
+ ChangeFieldType('bugs', 'short_desc', 'mediumtext not null');
+}
+
#
# Final checks...