diff options
-rwxr-xr-x | checksetup.pl | 10 | ||||
-rw-r--r-- | globals.pl | 7 |
2 files changed, 8 insertions, 9 deletions
diff --git a/checksetup.pl b/checksetup.pl index ea4377fe9..74d008708 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -1746,6 +1746,9 @@ sub AddFDef ($$$) { } +# Note that all of these entries are unconditional, from when GetFieldID +# used to create an entry if it wasn't found. New fielddef columns should +# be created with their associated schema change. AddFDef("bug_id", "Bug \#", 1); AddFDef("short_desc", "Summary", 1); AddFDef("product", "Product", 1); @@ -1779,9 +1782,10 @@ AddFDef("(to_days(now()) - to_days(bugs.delta_ts))", "Days since bug changed", 0); AddFDef("longdesc", "Comment", 0); AddFDef("alias", "Alias", 0); - - - +AddFDef("everconfirmed", "Ever Confirmed", 0); +AddFDef("groupset", "Groupset", 0); +AddFDef("reporter_accessible", "Reporter Accessible", 0); +AddFDef("cc_accessible", "CC Accessible", 0); ########################################################################### # Detect changed local settings diff --git a/globals.pl b/globals.pl index ec57bffb2..cdaf84512 100644 --- a/globals.pl +++ b/globals.pl @@ -349,12 +349,7 @@ sub GetFieldID { my ($f) = (@_); SendSQL("SELECT fieldid FROM fielddefs WHERE name = " . SqlQuote($f)); my $fieldid = FetchOneColumn(); - if (!$fieldid) { - my $q = SqlQuote($f); - SendSQL("REPLACE INTO fielddefs (name, description) VALUES ($q, $q)"); - SendSQL("SELECT LAST_INSERT_ID()"); - $fieldid = FetchOneColumn(); - } + die "Unknown field id: $f" if !$fieldid; return $fieldid; } |