From 8187ff6681a2260cb7897d3e4b5dca3cd1596381 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 11 Jul 2011 13:53:55 -0400 Subject: [PATCH] invert key -> (user, page) mapping in Realtime_channel table --- plugins/Realtime/Realtime_channel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Realtime/Realtime_channel.php b/plugins/Realtime/Realtime_channel.php index 2e25cac20f..39d89fbf9f 100644 --- a/plugins/Realtime/Realtime_channel.php +++ b/plugins/Realtime/Realtime_channel.php @@ -124,8 +124,8 @@ class Realtime_channel extends Managed_DataObject 'not null' => true, 'description' => 'date this record was modified'), ), - 'primary key' => array('user_id', 'action', 'arg1', 'arg2'), - 'unique keys' => array('realtime_channel_channel_key_idx' => array('channel_key')), + 'primary key' => array('channel_key'), + 'unique keys' => array('realtime_channel_user_page_idx' => array('user_id', 'action', 'arg1', 'arg2')), 'foreign keys' => array( 'realtime_channel_user_id_fkey' => array('user', array('user_id' => 'id')), ),