Skip to content

Commit 04d3db0

Browse files
authored
Further 5.0->6.0 schema upgrade fixes (#70)
1 parent f0bdc2c commit 04d3db0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: Bugzilla/DB/Schema.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ use constant ABSTRACT_SCHEMA => {
658658
FIELDS => [
659659
id => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, PRIMARYKEY => 1},
660660
type_id => {
661-
TYPE => 'INT2',
661+
TYPE => 'INT3',
662662
NOTNULL => 1,
663663
REFERENCES => {TABLE => 'flagtypes', COLUMN => 'id', DELETE => 'CASCADE'}
664664
},

Diff for: Bugzilla/Install/DB.pm

+7
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,15 @@ sub update_table_definitions {
484484
$dbh->bz_drop_column('groups', 'last_changed');
485485

486486
# 2006-08-06 [email protected] - Bug 347521
487+
$dbh->bz_drop_related_fks('flagtypes', 'id');
487488
$dbh->bz_alter_column('flagtypes', 'id',
488489
{TYPE => 'MEDIUMSERIAL', NOTNULL => 1, PRIMARYKEY => 1});
490+
$dbh->bz_alter_column('flags', 'type_id',
491+
{TYPE => 'INT3', NOTNULL => 1});
492+
$dbh->bz_alter_column('flaginclusions', 'type_id',
493+
{TYPE => 'INT3', NOTNULL => 1});
494+
$dbh->bz_alter_column('flagexclusions', 'type_id',
495+
{TYPE => 'INT3', NOTNULL => 1});
489496

490497
$dbh->bz_alter_column('keyworddefs', 'id',
491498
{TYPE => 'SMALLSERIAL', NOTNULL => 1, PRIMARYKEY => 1});

0 commit comments

Comments
 (0)