diff options
author | David Lawrence <dkl@mozilla.com> | 2014-04-10 16:29:53 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2014-04-10 16:29:53 +0200 |
commit | 94fd1545568688d8e2627c14dab6192942b6ed37 (patch) | |
tree | f4a679f16dd15b16cb03cb70edf7af0256a84b7e /Bugzilla | |
parent | a2689d0747d489c5d6f1b073a829df7d69357bda (diff) | |
parent | ffad8c2a00a341fdea08187a836c4d4365b2556f (diff) | |
download | bugzilla-94fd1545568688d8e2627c14dab6192942b6ed37.tar.gz bugzilla-94fd1545568688d8e2627c14dab6192942b6ed37.tar.xz |
Merge branch '4.2' of ssh://git.mozilla.org/webtools/bmo/bugzilla into 4.2
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/DB/Schema.pm | 10 | ||||
-rw-r--r-- | Bugzilla/DB/Schema/Mysql.pm | 2 | ||||
-rw-r--r-- | Bugzilla/Install/DB.pm | 23 |
3 files changed, 5 insertions, 30 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index e2a7e138e..d8f3e175a 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -342,13 +342,13 @@ use constant ABSTRACT_SCHEMA => { bugs_activity => { FIELDS => [ - id => {TYPE => 'BIGSERIAL', NOTNULL => 1, + id => {TYPE => 'INTSERIAL', NOTNULL => 1, PRIMARYKEY => 1}, bug_id => {TYPE => 'INT3', NOTNULL => 1, REFERENCES => {TABLE => 'bugs', COLUMN => 'bug_id', DELETE => 'CASCADE'}}, - attach_id => {TYPE => 'INT5', + attach_id => {TYPE => 'INT3', REFERENCES => {TABLE => 'attachments', COLUMN => 'attach_id', DELETE => 'CASCADE'}}, @@ -492,7 +492,7 @@ use constant ABSTRACT_SCHEMA => { attachments => { FIELDS => [ - attach_id => {TYPE => 'BIGSERIAL', NOTNULL => 1, + attach_id => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, PRIMARYKEY => 1}, bug_id => {TYPE => 'INT3', NOTNULL => 1, REFERENCES => {TABLE => 'bugs', @@ -523,7 +523,7 @@ use constant ABSTRACT_SCHEMA => { }, attach_data => { FIELDS => [ - id => {TYPE => 'INT5', NOTNULL => 1, + id => {TYPE => 'INT3', NOTNULL => 1, PRIMARYKEY => 1, REFERENCES => {TABLE => 'attachments', COLUMN => 'attach_id', @@ -636,7 +636,7 @@ use constant ABSTRACT_SCHEMA => { REFERENCES => {TABLE => 'bugs', COLUMN => 'bug_id', DELETE => 'CASCADE'}}, - attach_id => {TYPE => 'INT5', + attach_id => {TYPE => 'INT3', REFERENCES => {TABLE => 'attachments', COLUMN => 'attach_id', DELETE => 'CASCADE'}}, diff --git a/Bugzilla/DB/Schema/Mysql.pm b/Bugzilla/DB/Schema/Mysql.pm index f2450abf1..5fc50a986 100644 --- a/Bugzilla/DB/Schema/Mysql.pm +++ b/Bugzilla/DB/Schema/Mysql.pm @@ -108,12 +108,10 @@ sub _initialize { INT2 => 'smallint', INT3 => 'mediumint', INT4 => 'integer', - INT5 => 'bigint unsigned', SMALLSERIAL => 'smallint auto_increment', MEDIUMSERIAL => 'mediumint auto_increment', INTSERIAL => 'integer auto_increment', - BIGSERIAL => 'bigint unsigned auto_increment', TINYTEXT => 'tinytext', MEDIUMTEXT => 'mediumtext', diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index a217e0753..7ab533198 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -706,14 +706,6 @@ sub update_table_definitions { # 2013-08-16 glob@mozilla.com - Bug 905925 $dbh->bz_add_index('attachments', 'attachments_ispatch_idx', ['ispatch']); - # 2014-03-11 glob@mozilla.com - Bug 981756 (BMO only) - _fix_attachments_primary_key(); - if ($dbh->bz_column_info('bugs_activity', 'id')->{TYPE} ne 'BIGSERIAL') { - $dbh->bz_drop_related_fks('bugs_activity', 'id'); - $dbh->bz_alter_column('bugs_activity', 'id', - {TYPE => 'BIGSERIAL', NOTNULL => 1, PRIMARYKEY => 1}); - } - ################################################################ # New --TABLE-- changes should go *** A B O V E *** this point # ################################################################ @@ -3745,21 +3737,6 @@ sub _fix_longdescs_primary_key { } } -sub _fix_attachments_primary_key { - my $dbh = Bugzilla->dbh; - if ($dbh->bz_column_info('attachments', 'attach_id')->{TYPE} ne 'BIGSERIAL') { - $dbh->bz_drop_related_fks('attachments', 'attach_id'); - $dbh->bz_alter_column('attach_data', 'id', {TYPE => 'INT5'}); - $dbh->bz_alter_column('bugs_activity', 'attach_id', {TYPE => 'INT5'}); - $dbh->bz_alter_column('flags', 'attach_id', {TYPE => 'INT5'}); - # the following two are bmo extensions - $dbh->bz_alter_column('flag_state_activity', 'attachment_id', {TYPE => 'INT5'}); - $dbh->bz_alter_column('autoland_attachments', 'attach_id', {TYPE => 'INT5'}); - $dbh->bz_alter_column('attachments', 'attach_id', - {TYPE => 'BIGSERIAL', NOTNULL => 1, PRIMARYKEY => 1}); - } -} - sub _fix_dependencies_dupes { my $dbh = Bugzilla->dbh; my $blocked_idx = $dbh->bz_index_info('dependencies', 'dependencies_blocked_idx'); |