Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
653b2aca
Commit
653b2aca
authored
Jan 23, 2011
by
rojanu
Committed by
Frédéric Buclin
Jan 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 625741: Need a hook in update_fielddefs_definition to enable adding columns to fielddefs
r/a=mkanat
parent
8c73136c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
Hook.pm
Bugzilla/Hook.pm
+9
-0
DB.pm
Bugzilla/Install/DB.pm
+2
-0
Extension.pm
extensions/Example/Extension.pm
+6
-0
No files found.
Bugzilla/Hook.pm
View file @
653b2aca
...
...
@@ -718,6 +718,15 @@ during an installation or upgrade. If you need to modify your custom
schema or add new columns to existing tables, do it here. No params are
passed.
=head2 install_update_db_fielddefs
This is used to update the schema of the fielddefs table before
any other schema changes take place. No params are passed.
This hook should only be used for updating the schema of the C<fielddefs>
table. Do not modify any other table in this hook. To modify other tables, use
the L</install_update_db> hook.
=head2 db_schema_abstract_schema
This allows you to add tables to Bugzilla. Note that we recommend that you
...
...
Bugzilla/Install/DB.pm
View file @
653b2aca
...
...
@@ -119,6 +119,8 @@ sub update_fielddefs_definition {
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
,
DEFAULT
=>
'FALSE'
});
$dbh
->
do
(
'UPDATE fielddefs SET is_numeric = 1 WHERE type = '
.
FIELD_TYPE_BUG_ID
);
Bugzilla::Hook::
process
(
'install_update_db_fielddefs'
);
# Remember, this is not the function for adding general table changes.
# That is below. Add new changes to the fielddefs table above this
...
...
extensions/Example/Extension.pm
View file @
653b2aca
...
...
@@ -402,6 +402,12 @@ sub install_before_final_checks {
# hook/global/setting-descs-settings.none.tmpl .
}
#sub install_update_db_fielddefs {
# my $dbh = Bugzilla->dbh;
# $dbh->bz_add_column('fielddefs', 'example_column',
# {TYPE => 'MEDIUMTEXT', NOTNULL => 1, DEFAULT => ''});
#}
sub
job_map
{
my
(
$self
,
$args
)
=
@_
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment