summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-04-14 15:58:24 +0200
committermkanat%kerio.com <>2005-04-14 15:58:24 +0200
commit67752a4f62201f91212d81a927c8af6c799260f9 (patch)
tree447a3e19c867a30463238f96819529ce35bc60e5 /checksetup.pl
parenta8302d335f48151dd16dfbae8cb63a2aa022b77b (diff)
downloadbugzilla-67752a4f62201f91212d81a927c8af6c799260f9.tar.gz
bugzilla-67752a4f62201f91212d81a927c8af6c799260f9.tar.xz
Bug 289453: components.initialowner is different in Bugzilla::DB::Schema than it was in the old checksetup
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=Tomas.Kopal, a=justdave
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/checksetup.pl b/checksetup.pl
index fa8cf7354..f64bd350a 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -3944,6 +3944,17 @@ add_setting ("comment_sort_order", {"oldest_to_newest" => 1,
$dbh->bz_change_field_type('products', 'classification_id',
'smallint NOT NULL DEFAULT 1');
+# initialowner was accidentally NULL when we checked-in Schema,
+# when it really should be NOT NULL.
+if ($dbh->bz_get_field_def('components', 'initialowner')->[2]) { # if NULL
+ # There's technically no way a real NULL could have gotten into
+ # initialowner, but better safe than sorry.
+ $dbh->do('UPDATE components SET initialowner = 0
+ WHERE initialowner IS NULL');
+ $dbh->bz_change_field_type('components', 'initialowner',
+ 'mediumint NOT NULL');
+}
+
} # END LEGACY CHECKS
# If you had to change the --TABLE-- definition in any way, then add your