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
8d0710ac
Commit
8d0710ac
authored
Mar 01, 2010
by
Xiaoou Wu
Committed by
Max Kanat-Alexander
Mar 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 541553: [Oracle] Drop triggers when dropping columns, and drop the
left-behind PRODUCTS_MILESTONEURL trigger that currently exists in 3.6/trunk. r=mkanat, a=mkanat
parent
cab671b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
Oracle.pm
Bugzilla/DB/Oracle.pm
+8
-0
Oracle.pm
Bugzilla/DB/Schema/Oracle.pm
+16
-0
No files found.
Bugzilla/DB/Oracle.pm
View file @
8d0710ac
...
...
@@ -676,6 +676,14 @@ sub bz_setup_database {
}
}
# Drop the trigger which causes bug 541553
my
$trigger_name
=
"PRODUCTS_MILESTONEURL"
;
my
$exist_trigger
=
$self
->
selectcol_arrayref
(
"SELECT OBJECT_NAME FROM USER_OBJECTS
WHERE OBJECT_NAME = ?"
,
undef
,
$trigger_name
);
if
(
@$exist_trigger
)
{
$self
->
do
(
"DROP TRIGGER $trigger_name"
);
}
}
package
Bugzilla::DB::Oracle::
st
;
...
...
Bugzilla/DB/Schema/Oracle.pm
View file @
8d0710ac
...
...
@@ -412,4 +412,20 @@ sub get_set_serial_sql {
return
@sql
;
}
sub
get_drop_column_ddl
{
my
$self
=
shift
;
my
(
$table
,
$column
)
=
@_
;
my
@sql
;
push
(
@sql
,
$self
->
SUPER::
get_drop_column_ddl
(
@_
));
my
$dbh
=
Bugzilla
->
dbh
;
my
$trigger_name
=
uc
(
$table
.
"_"
.
$column
);
my
$exist_trigger
=
$dbh
->
selectcol_arrayref
(
"SELECT OBJECT_NAME FROM USER_OBJECTS
WHERE OBJECT_NAME = ?"
,
undef
,
$trigger_name
);
if
(
@$exist_trigger
)
{
push
(
@sql
,
"DROP TRIGGER $trigger_name"
);
}
return
@sql
;
}
1
;
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