Closed Bug 350217 Opened 20 years ago Closed 20 years ago

Extensions need to be able to update Bugzilla's DB schema

Categories

(Bugzilla :: Database, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: gregaryh, Assigned: mkanat)

Details

Attachments

(1 file, 1 obsolete file)

I would like to use the DB module methods to manipulate the Testopia tables. To do so I need to be able to extend ABSTRACT_SCHEMA. Since this is currently a constant, it is not possible without patching the Schema.pm file directly.
Okay, I'm expanding the scope of this bug a little, to do everything that Testopia will need during installation, as far as DB updates.
Severity: normal → enhancement
OS: Linux → All
Hardware: PC → All
Summary: Need to be able to extend ABSTRACT_SCHEMA for extensions. → Extensions need to be able to update Bugzilla's DB schema
Target Milestone: --- → Bugzilla 3.0
Attached patch v1 (obsolete) — Splinter Review
Okay, this extends the hooks system to do what we need. Does this do what you need, ghendricks?
Assignee: database → mkanat
Status: NEW → ASSIGNED
Attachment #237201 - Flags: review?(ghendricks)
Comment on attachment 237201 [details] [diff] [review] v1 > =item C<process> > >-Invoke any code hooks with a matching name from any installed extensions. >-When this subroutine is called with hook name foo, Bugzilla will attempt >-to invoke any source files in C<bugzilla/extension/EXTENSION_NAME/code/foo.pl>. >+=over foo.pl isn't clear. Does this mean I can name this file anything i want? >+ >+=item B<Description> >+ >+Invoke any code hooks with a matching name from any installed extensions. >+ >+When this subroutine is called with hook name C<foo>, Bugzilla will attempt >+to invoke any source files in F<extensions/EXTENSION_NAME/code/foo.pl>. > See C<customization.xml> in the Bugzilla Guide for more information on >-Bugzilla's extension mechanism. >+Bugzilla's extension mechanism. >+ >+=item B<Params> >+ >+=over >+ >+=item C<$name> - The name of the hook to invoke. >+ >+=item C<$args> - A hashref. The named args to pass to the hook. >+They will be accessible to the hook via L<Bugzilla/hook_args>. >+ Nit: an example of what $args might look like would be nice here.
Attachment #237201 - Flags: review?(ghendricks) → review-
Attached patch v2Splinter Review
Okay, this much improves the POD.
Attachment #237201 - Attachment is obsolete: true
Attachment #237214 - Flags: review?
Attachment #237214 - Flags: review? → review?(ghendricks)
Attachment #237214 - Flags: review?(ghendricks) → review+
Flags: approval?
Flags: approval? → approval+
Checking in Bugzilla.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla.pm,v <-- Bugzilla.pm new revision: 1.47; previous revision: 1.46 done Checking in enter_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/enter_bug.cgi,v <-- enter_bug.cgi new revision: 1.149; previous revision: 1.148 done Checking in Bugzilla/Hook.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Hook.pm,v <-- Hook.pm new revision: 1.5; previous revision: 1.4 done Checking in Bugzilla/DB/Schema.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema.pm,v <-- Schema.pm new revision: 1.70; previous revision: 1.69 done Checking in Bugzilla/Install/DB.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/DB.pm,v <-- DB.pm new revision: 1.18; previous revision: 1.17 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: