[SCHEMA CHANGE] Bug 220232: short_desc field in the bugs table is no longer…

[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
parent 6b740b9f
......@@ -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...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment