From 619707466974c0a6fbf5de98374e38ad7d5f5937 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 9 Sep 2013 14:15:33 +0800 Subject: Bug 912564: tbpl gets deadlocks setting last_activity_ts (schema only) --- extensions/UserProfile/Extension.pm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/extensions/UserProfile/Extension.pm b/extensions/UserProfile/Extension.pm index 43213be54..c0b22b8c5 100644 --- a/extensions/UserProfile/Extension.pm +++ b/extensions/UserProfile/Extension.pm @@ -421,6 +421,25 @@ sub db_schema_abstract_schema { }, ], }; + $args->{'schema'}->{'profiles_statistics_recalc'} = { + FIELDS => [ + user_id => { + TYPE => 'INT3', + NOTNULL => 1, + REFERENCES => { + TABLE => 'profiles', + COLUMN => 'userid', + DELETE => 'CASCADE', + } + }, + ], + INDEXES => [ + profiles_statistics_recalc_idx => { + FIELDS => [ 'user_id' ], + TYPE => 'UNIQUE', + }, + ], + }; } sub install_update_db { -- cgit v1.2.3-24-g4f1b