summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB.pm
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-12-30 07:27:25 +0100
committermkanat%kerio.com <>2005-12-30 07:27:25 +0100
commit782a89bc8bd905fa5ac3532c984ad2b4b149e8fd (patch)
tree647e8a668ebe18da266024aa68af393fc89f719e /Bugzilla/DB.pm
parentf4401b3f02b75e8dfe563b516702e249e60b7eb7 (diff)
downloadbugzilla-782a89bc8bd905fa5ac3532c984ad2b4b149e8fd.tar.gz
bugzilla-782a89bc8bd905fa5ac3532c984ad2b4b149e8fd.tar.xz
Bug 311047: populating enum tables fails without localconfig, when upgrading
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> and Nick Barnes <nb+bz@ravenbrook.com> r=mkanat, r=LpSolit, a=justdave
Diffstat (limited to 'Bugzilla/DB.pm')
-rw-r--r--Bugzilla/DB.pm27
1 files changed, 27 insertions, 0 deletions
diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm
index 1da845942..a36ca909d 100644
--- a/Bugzilla/DB.pm
+++ b/Bugzilla/DB.pm
@@ -336,6 +336,13 @@ sub bz_setup_database {
}
}
+# The defauly implementation just returns what you passed-in. This function
+# really exists just to be overridden in Bugzilla::DB::Mysql.
+sub bz_enum_initial_values {
+ my ($self, $enum_defaults) = @_;
+ return $enum_defaults;
+}
+
#####################################################################
# Schema Modification Methods
#####################################################################
@@ -1283,6 +1290,26 @@ These methods return information about data in the database.
=back
+=head2 Database Setup Methods
+
+These methods are used by the Bugzilla installation programs to set up
+the database.
+
+=over 4
+
+=item C<bz_enum_initial_values(\%enum_defaults)>
+
+ Description: For an upgrade or an initial installation, provides
+ what the values should be for the "enum"-type fields,
+ such as version, op_sys, rep_platform, etc.
+ Params: \%enum_defaults - The default initial list of values for
+ each enum field. A hash, with the field
+ names pointing to an arrayref of values.
+ Returns: A hashref with the correct initial values for the enum fields.
+
+=back
+
+
=head2 Schema Modification Methods
These methods modify the current Bugzilla Schema.