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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
d0b2bc68
Commit
d0b2bc68
authored
Jul 31, 2012
by
Dave Lawrence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 776982 - Increase longdescs primary key size to INTSERIAL for future growth
r/a=LpSolit
parent
cba46b0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
Schema.pm
Bugzilla/DB/Schema.pm
+2
-2
DB.pm
Bugzilla/Install/DB.pm
+15
-2
No files found.
Bugzilla/DB/Schema.pm
View file @
d0b2bc68
...
...
@@ -341,7 +341,7 @@ use constant ABSTRACT_SCHEMA => {
COLUMN
=>
'id'
}},
added
=>
{
TYPE
=>
'varchar(255)'
},
removed
=>
{
TYPE
=>
'varchar(255)'
},
comment_id
=>
{
TYPE
=>
'INT
3
'
,
comment_id
=>
{
TYPE
=>
'INT
4
'
,
REFERENCES
=>
{
TABLE
=>
'longdescs'
,
COLUMN
=>
'comment_id'
,
DELETE
=>
'CASCADE'
}},
...
...
@@ -376,7 +376,7 @@ use constant ABSTRACT_SCHEMA => {
longdescs
=>
{
FIELDS
=>
[
comment_id
=>
{
TYPE
=>
'
MEDIUM
SERIAL'
,
NOTNULL
=>
1
,
comment_id
=>
{
TYPE
=>
'
INT
SERIAL'
,
NOTNULL
=>
1
,
PRIMARYKEY
=>
1
},
bug_id
=>
{
TYPE
=>
'INT3'
,
NOTNULL
=>
1
,
REFERENCES
=>
{
TABLE
=>
'bugs'
,
...
...
Bugzilla/Install/DB.pm
View file @
d0b2bc68
...
...
@@ -440,7 +440,7 @@ sub update_table_definitions {
# 2005-12-07 altlst@sonic.net -- Bug 225221
$dbh
->
bz_add_column
(
'longdescs'
,
'comment_id'
,
{
TYPE
=>
'
MEDIUM
SERIAL'
,
NOTNULL
=>
1
,
PRIMARYKEY
=>
1
});
{
TYPE
=>
'
INT
SERIAL'
,
NOTNULL
=>
1
,
PRIMARYKEY
=>
1
});
_stop_storing_inactive_flags
();
_change_short_desc_from_mediumtext_to_varchar
();
...
...
@@ -592,7 +592,7 @@ sub update_table_definitions {
_fix_series_creator_fk
();
# 2009-11-14 dkl@redhat.com - Bug 310450
$dbh
->
bz_add_column
(
'bugs_activity'
,
'comment_id'
,
{
TYPE
=>
'INT
3
'
});
$dbh
->
bz_add_column
(
'bugs_activity'
,
'comment_id'
,
{
TYPE
=>
'INT
4
'
});
# 2010-04-07 LpSolit@gmail.com - Bug 69621
$dbh
->
bz_drop_column
(
'bugs'
,
'keywords'
);
...
...
@@ -691,6 +691,9 @@ sub update_table_definitions {
{
TYPE
=>
'INTSERIAL'
,
NOTNULL
=>
1
,
PRIMARYKEY
=>
1
});
# 2012-07-24 dkl@mozilla.com - Bug 776982
_fix_longdescs_primary_key
();
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################
...
...
@@ -3712,6 +3715,16 @@ sub _fix_notnull_defaults {
}
}
sub
_fix_longdescs_primary_key
{
my
$dbh
=
Bugzilla
->
dbh
;
if
(
$dbh
->
bz_column_info
(
'longdescs'
,
'comment_id'
)
->
{
TYPE
}
ne
'INTSERIAL'
)
{
$dbh
->
bz_drop_related_fks
(
'longdescs'
,
'comment_id'
);
$dbh
->
bz_alter_column
(
'bugs_activity'
,
'comment_id'
,
{
TYPE
=>
'INT4'
});
$dbh
->
bz_alter_column
(
'longdescs'
,
'comment_id'
,
{
TYPE
=>
'INTSERIAL'
,
NOTNULL
=>
1
,
PRIMARYKEY
=>
1
});
}
}
1
;
__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