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
70a3ca18
Commit
70a3ca18
authored
Feb 20, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 519035: Make the FK for series.creator have ON DELETE CASCADE instead
of ON DELETE SET NULL r=LpSolit, a=LpSolit
parent
abeb2964
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
Schema.pm
Bugzilla/DB/Schema.pm
+1
-1
DB.pm
Bugzilla/Install/DB.pm
+11
-0
No files found.
Bugzilla/DB/Schema.pm
View file @
70a3ca18
...
@@ -1248,7 +1248,7 @@ use constant ABSTRACT_SCHEMA => {
...
@@ -1248,7 +1248,7 @@ use constant ABSTRACT_SCHEMA => {
creator
=>
{
TYPE
=>
'INT3'
,
creator
=>
{
TYPE
=>
'INT3'
,
REFERENCES
=>
{
TABLE
=>
'profiles'
,
REFERENCES
=>
{
TABLE
=>
'profiles'
,
COLUMN
=>
'userid'
,
COLUMN
=>
'userid'
,
DELETE
=>
'
SET NULL
'
}},
DELETE
=>
'
CASCADE
'
}},
category
=>
{
TYPE
=>
'INT2'
,
NOTNULL
=>
1
,
category
=>
{
TYPE
=>
'INT2'
,
NOTNULL
=>
1
,
REFERENCES
=>
{
TABLE
=>
'series_categories'
,
REFERENCES
=>
{
TABLE
=>
'series_categories'
,
COLUMN
=>
'id'
,
COLUMN
=>
'id'
,
...
...
Bugzilla/Install/DB.pm
View file @
70a3ca18
...
@@ -598,6 +598,7 @@ sub update_table_definitions {
...
@@ -598,6 +598,7 @@ sub update_table_definitions {
_add_allows_unconfirmed_to_product_table
();
_add_allows_unconfirmed_to_product_table
();
_convert_flagtypes_fks_to_set_null
();
_convert_flagtypes_fks_to_set_null
();
_fix_decimal_types
();
_fix_decimal_types
();
_fix_series_creator_fk
();
# 2009-11-14 dkl@redhat.com - Bug 310450
# 2009-11-14 dkl@redhat.com - Bug 310450
$dbh
->
bz_add_column
(
'bugs_activity'
,
'comment_id'
,
{
TYPE
=>
'INT3'
});
$dbh
->
bz_add_column
(
'bugs_activity'
,
'comment_id'
,
{
TYPE
=>
'INT3'
});
...
@@ -3374,6 +3375,16 @@ sub _fix_decimal_types {
...
@@ -3374,6 +3375,16 @@ sub _fix_decimal_types {
$dbh
->
bz_alter_column
(
'longdescs'
,
'work_time'
,
$type
);
$dbh
->
bz_alter_column
(
'longdescs'
,
'work_time'
,
$type
);
}
}
sub
_fix_series_creator_fk
{
my
$dbh
=
Bugzilla
->
dbh
;
my
$fk
=
$dbh
->
bz_fk_info
(
'series'
,
'creator'
);
# Change the FK from SET NULL to CASCADE. (It will be re-created
# automatically at the end of all DB changes.)
if
(
$fk
and
$fk
->
{
DELETE
}
eq
'SET NULL'
)
{
$dbh
->
bz_drop_fk
(
'series'
,
'creator'
);
}
}
1
;
1
;
__END__
__END__
...
...
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