]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 573454: Make the products.description field be NOT NULL in the
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 22 Jun 2010 02:44:04 +0000 (19:44 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 22 Jun 2010 02:44:04 +0000 (19:44 -0700)
database
r=timello, a=mkanat

Bugzilla/DB/Schema.pm
Bugzilla/Install/DB.pm

index c354c1bebd96e5391631477748f692e9c2706bcf..9fc507885014173c9321578f1d467b1c48b5e873 100644 (file)
@@ -1217,7 +1217,7 @@ use constant ABSTRACT_SCHEMA => {
                                   REFERENCES => {TABLE  => 'classifications',
                                                  COLUMN => 'id',
                                                  DELETE => 'CASCADE'}},
-            description       => {TYPE => 'MEDIUMTEXT'},
+            description       => {TYPE => 'MEDIUMTEXT', NOTNULL => 1},
             isactive          => {TYPE => 'BOOLEAN', NOTNULL => 1,
                                   DEFAULT => 1},
             defaultmilestone  => {TYPE => 'varchar(20)',
index 7599199ab6a67d5ea9a31df74618fb627477da53..069096800ecaaca5db35c1d9064decaea971dac1 100644 (file)
@@ -616,10 +616,14 @@ sub update_table_definitions {
     $dbh->bz_alter_column('group_control_map', 'othercontrol',
                           {TYPE => 'INT1', NOTNULL => 1, DEFAULT => CONTROLMAPNA});
 
+    # Add NOT NULL to some columns that need it, and DEFAULT to
+    # attachments.ispatch.
     $dbh->bz_alter_column('attachments', 'ispatch', 
         { TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'FALSE'});
     $dbh->bz_alter_column('keyworddefs', 'description',
                           { TYPE => 'MEDIUMTEXT', NOTNULL => 1 }, '');
+    $dbh->bz_alter_column('products', 'description',
+                          { TYPE => 'MEDIUMTEXT', NOTNULL => 1 }, '');
 
     ################################################################
     # New --TABLE-- changes should go *** A B O V E *** this point #