]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 309760: series.public rename breaks upgrades from 2.17.1
authormkanat%kerio.com <>
Tue, 27 Sep 2005 23:55:24 +0000 (23:55 +0000)
committermkanat%kerio.com <>
Tue, 27 Sep 2005 23:55:24 +0000 (23:55 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=joel, a=justdave

checksetup.pl

index 2c7eca5c192347a172669a5ec4b1f3cf593b2229..3e84e19d340f670b6037d7fe44d44d06e2949391 100755 (executable)
@@ -3917,8 +3917,12 @@ if ( $dbh->isa('Bugzilla::DB::Mysql') ) {
     if ( $approved_col->{TYPE_NAME} eq 'TINYINT'
          and $approved_col->{COLUMN_SIZE} == 1 )
     {
-        $dbh->bz_alter_column_raw('series', 'public',
-            {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => '0'});
+        # series.public could have been renamed to series.is_public,
+        # and so wouldn't need to be fixed manually.
+        if ($dbh->bz_column_info('series', 'public')) {
+            $dbh->bz_alter_column_raw('series', 'public',
+                {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => '0'});
+        }
         $dbh->bz_alter_column_raw('bug_status', 'isactive',
             {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => '1'});
         $dbh->bz_alter_column_raw('rep_platform', 'isactive',