]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 764457 - Add a primary key to the bugs_activity table
authorDave Lawrence <dlawrence@mozilla.com>
Mon, 23 Jul 2012 21:23:43 +0000 (17:23 -0400)
committerDave Lawrence <dlawrence@mozilla.com>
Mon, 23 Jul 2012 21:23:43 +0000 (17:23 -0400)
r=glob, a=LpSolit

Bugzilla/DB/Schema.pm
Bugzilla/Install/DB.pm
contrib/recode.pl

index fadc38fc5b5e2b7bb63cafc07fe9ddca7c3d8186..7293d25d89988722b72df6a1e3cab562d2966edb 100644 (file)
@@ -322,6 +322,8 @@ use constant ABSTRACT_SCHEMA => {
 
     bugs_activity => {
         FIELDS => [
+            id        => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, 
+                          PRIMARYKEY => 1}, 
             bug_id    => {TYPE => 'INT3', NOTNULL => 1,
                           REFERENCES    =>  {TABLE  =>  'bugs',
                                              COLUMN =>  'bug_id',
index ba656a769d5e8fc5e6510a438f6a56df001af071..f516748b9011cd8d81698f963e2548c62d099d1b 100644 (file)
@@ -678,6 +678,10 @@ sub update_table_definitions {
                           { TYPE => 'varchar(255)' });
     $dbh->bz_add_index('bugs_activity', 'bugs_activity_removed_idx', ['removed']);
 
+    # 2012-06-13 dkl@mozilla.com - Bug 764457
+    $dbh->bz_add_column('bugs_activity', 'id', 
+                        {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, PRIMARYKEY => 1});
+
     ################################################################
     # New --TABLE-- changes should go *** A B O V E *** this point #
     ################################################################
index 880bc4e466f184ef1e0c63bf668dd920570806c9..cf0997a5284d9afe1b57033e770378ec8d453ecf 100755 (executable)
@@ -29,6 +29,7 @@ use constant MAX_STRING_LEN => 25;
 # For certain tables, we can't automatically determine their Primary Key.
 # So, we specify it here as a string.
 use constant SPECIAL_KEYS => {
+    # bugs_activity since 4.4 has a unique primary key added
     bugs_activity     => 'bug_id,bug_when,fieldid',
     profile_setting   => 'user_id,setting_name',
     profiles_activity => 'userid,profiles_when,fieldid',