Commit 3dce1aa3 authored by Dave Lawrence's avatar Dave Lawrence

Bug 764457 - Add a primary key to the bugs_activity table

r=glob, a=LpSolit
parent 58cfa7b9
......@@ -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',
......
......@@ -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 #
################################################################
......
......@@ -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',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment