diff options
author | terry%mozilla.org <> | 2000-01-23 06:43:29 +0100 |
---|---|---|
committer | terry%mozilla.org <> | 2000-01-23 06:43:29 +0100 |
commit | 6c604de4e442ea6fb716e6ca322a49773e795a74 (patch) | |
tree | 364422f2c6ac3f21fcaae83099ebb94d4da01ca4 /checksetup.pl | |
parent | d9c667d9165679a7cbaaf38345158eac955c1f5d (diff) | |
download | bugzilla-6c604de4e442ea6fb716e6ca322a49773e795a74.tar.gz bugzilla-6c604de4e442ea6fb716e6ca322a49773e795a74.tar.xz |
AACK! checksetup.pl was stomping all over the new fielddefs table if
it got run more than once. This checkin fixes that, and also changes
the DumpBugActivity() routine to give me enough information to
hopefully repair the damaged mozilla.org database...
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-x | checksetup.pl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/checksetup.pl b/checksetup.pl index 02e629805..6adbc42f4 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -851,9 +851,17 @@ sub AddFDef ($$$) { $name = $dbh->quote($name); $description = $dbh->quote($description); + my $sth = $dbh->prepare("SELECT fieldid FROM fielddefs " . + "WHERE name = $name"); + $sth->execute(); + my ($fieldid) = ($sth->fetchrow_array()); + if (!$fieldid) { + $fieldid = 'NULL'; + } + $dbh->do("REPLACE INTO fielddefs " . - "(name, description, mailhead, sortkey) VALUES " . - "($name, $description, $mailhead, $headernum)"); + "(fieldid, name, description, mailhead, sortkey) VALUES " . + "($fieldid, $name, $description, $mailhead, $headernum)"); $headernum++; } @@ -876,6 +884,7 @@ AddFDef("cc", "CC", 0); AddFDef("dependson", "BugsThisDependsOn", 0); AddFDef("blocked", "OtherBugsDependingOnThis", 0); AddFDef("target_milestone", "Target Milestone", 0); +AddFDef("stupidtest", "Stupidtest", 0); |