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
df3d1737
Commit
df3d1737
authored
Jul 08, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 577577: Make bz_drop_fk be tolerant of SQL failure
r=mkanat, a=mkanat (module owner)
parent
d500177f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
DB.pm
Bugzilla/DB.pm
+8
-2
No files found.
Bugzilla/DB.pm
View file @
df3d1737
...
...
@@ -771,8 +771,14 @@ sub bz_drop_fk {
print
get_text
(
'install_fk_drop'
,
{
table
=>
$table
,
column
=>
$column
,
fk
=>
$def
})
.
"\n"
if
Bugzilla
->
usage_mode
==
USAGE_MODE_CMDLINE
;
my
@sql
=
$self
->
_bz_real_schema
->
get_drop_fk_sql
(
$table
,
$column
,
$def
);
$self
->
do
(
$_
)
foreach
@sql
;
my
@statements
=
$self
->
_bz_real_schema
->
get_drop_fk_sql
(
$table
,
$column
,
$def
);
foreach
my
$sql
(
@statements
)
{
# Because this is a deletion, we don't want to die hard if
# we fail because of some local customization. If something
# is already gone, that's fine with us!
eval
{
$self
->
do
(
$sql
);
}
or
warn
"Failed SQL: [$sql] Error: $@"
;
}
delete
$col_def
->
{
REFERENCES
};
$self
->
_bz_real_schema
->
set_column
(
$table
,
$column
,
$col_def
);
$self
->
_bz_store_real_schema
;
...
...
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