]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 285690: bugs.status_whiteboard, bugs.votes, and bugs.keywords need defaults in...
authormkanat%kerio.com <>
Sat, 12 Mar 2005 03:08:06 +0000 (03:08 +0000)
committermkanat%kerio.com <>
Sat, 12 Mar 2005 03:08:06 +0000 (03:08 +0000)
Patch By Max Kanat-Alexander <mkanat@kerio.com> r=Tomas.Kopal, a=myk

Bugzilla/DB/Schema.pm
checksetup.pl

index 99f5f106fd8bb185d33d3e55e2f9874792989782..a879684ea5f75903fca94e24b81d6a851311d141 100644 (file)
@@ -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',
index c82d4a3b4b71e2e692da7796a6687cdb99150d32..b2b6cf333d487e0d48589cc4438b9410e45c3dc6 100755 (executable)
@@ -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.
 #