From: mkanat%kerio.com <> Date: Sat, 12 Mar 2005 03:08:06 +0000 (+0000) Subject: Bug 285690: bugs.status_whiteboard, bugs.votes, and bugs.keywords need defaults in... X-Git-Tag: bugzilla-2.19.3~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66b4c8717eb0a5bf89e3f02b5efab4daa8b9e1d5;p=thirdparty%2Fbugzilla.git Bug 285690: bugs.status_whiteboard, bugs.votes, and bugs.keywords need defaults in the Schema Patch By Max Kanat-Alexander r=Tomas.Kopal, a=myk --- diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 99f5f106fd..a879684ea5 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -146,11 +146,14 @@ use constant ABSTRACT_SCHEMA => { target_milestone => {TYPE => 'varchar(20)', NOTNULL => 1, DEFAULT => "'---'"}, qa_contact => {TYPE => 'INT3', NOTNULL => 1}, - status_whiteboard => {TYPE => 'MEDIUMTEXT', NOTNULL => 1}, - votes => {TYPE => 'INT3', NOTNULL => 1}, + status_whiteboard => {TYPE => 'MEDIUMTEXT', NOTNULL => 1, + DEFAULT => "''"}, + votes => {TYPE => 'INT3', NOTNULL => 1, + DEFAULT => '0'}, # Note: keywords field is only a cache; the real data # comes from the keywords table - keywords => {TYPE => 'MEDIUMTEXT', NOTNULL => 1}, + keywords => {TYPE => 'MEDIUMTEXT', NOTNULL => 1, + DEFAULT => "''"}, lastdiffed => {TYPE => 'DATETIME', NOTNULL => 1}, everconfirmed => {TYPE => 'BOOLEAN', NOTNULL => 1}, reporter_accessible => {TYPE => 'BOOLEAN', diff --git a/checksetup.pl b/checksetup.pl index c82d4a3b4b..b2b6cf333d 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -3649,6 +3649,12 @@ if (!$dbh->bz_get_field_def('fielddefs', 'obsolete')) { } +$dbh->bz_change_field_type('bugs', 'status_whiteboard', + q{mediumtext not null default ''}); +$dbh->bz_change_field_type('bugs', 'keywords', + q{mediumtext not null default ''}); +$dbh->bz_change_field_type('bugs', 'votes', 'mediumint not null default 0'); + # If you had to change the --TABLE-- definition in any way, then add your # differential change code *** A B O V E *** this comment. #