From af0eded741b44769de60e1242278023bbf3b00ad Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 4 Jul 2011 15:58:56 -0400 Subject: [PATCH] add an URI index to blogs so they get cached --- plugins/Blog/Blog_entry.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/Blog/Blog_entry.php b/plugins/Blog/Blog_entry.php index f3166f870a..b40039b2d7 100644 --- a/plugins/Blog/Blog_entry.php +++ b/plugins/Blog/Blog_entry.php @@ -63,7 +63,7 @@ class Blog_entry extends Managed_DataObject function staticGet($k, $v=null) { - return Managed_DataObject::staticGet('blog_entry', $k, $v); + return Managed_DataObject::staticGet('Blog_entry', $k, $v); } static function schemaDef() @@ -99,12 +99,14 @@ class Blog_entry extends Managed_DataObject 'description' => 'date this record was created'), ), 'primary key' => array('id'), + 'unique keys' => array( + 'blog_entry_uri_key' => array('uri'), + ), 'foreign keys' => array( 'blog_entry_profile_id_fkey' => array('profile', array('profile_id' => 'id')), ), 'indexes' => array( - 'blog_entry_created_idx' => array('created'), - 'blog_entry_uri_idx' => array('uri'), + 'blog_entry_created_idx' => array('created') ), ); } -- 2.39.5