diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index e1c1629d61..4268796c42 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -658,7 +658,7 @@ use constant ABSTRACT_SCHEMA => { FIELDS => [ id => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, PRIMARYKEY => 1}, type_id => { - TYPE => 'INT2', + TYPE => 'INT3', NOTNULL => 1, REFERENCES => {TABLE => 'flagtypes', COLUMN => 'id', DELETE => 'CASCADE'} }, diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index ff276cab85..32be6b9194 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -484,8 +484,15 @@ sub update_table_definitions { $dbh->bz_drop_column('groups', 'last_changed'); # 2006-08-06 LpSolit@gmail.com - Bug 347521 + $dbh->bz_drop_related_fks('flagtypes', 'id'); $dbh->bz_alter_column('flagtypes', 'id', {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, PRIMARYKEY => 1}); + $dbh->bz_alter_column('flags', 'type_id', + {TYPE => 'INT3', NOTNULL => 1}); + $dbh->bz_alter_column('flaginclusions', 'type_id', + {TYPE => 'INT3', NOTNULL => 1}); + $dbh->bz_alter_column('flagexclusions', 'type_id', + {TYPE => 'INT3', NOTNULL => 1}); $dbh->bz_alter_column('keyworddefs', 'id', {TYPE => 'SMALLSERIAL', NOTNULL => 1, PRIMARYKEY => 1});