Last Comment Bug 408680 - Add support for reviews column in addons table
: Add support for reviews column in addons table
Status: RESOLVED FIXED
:
Product: addons.mozilla.org Graveyard
Classification: Graveyard
Component: Administration (show other bugs)
: unspecified
: All All
: -- normal
: 3.2
Assigned To: Michael Morgan [:morgamic]
:
:
Mentors:
Depends on:
Blocks: 415184
  Show dependency treegraph
 
Reported: 2007-12-17 07:37 PST by Michael Morgan [:morgamic]
Modified: 2016-03-07 07:30 PST (History)
0 users
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
v1, adding column to addons and case to maintenance script (8.82 KB, patch)
2008-01-16 10:00 PST, Michael Morgan [:morgamic]
no flags Details | Diff | Splinter Review
v1.5, fixes maint script col name and adds column to addon model (1.40 KB, patch)
2008-01-28 22:58 PST, Michael Morgan [:morgamic]
bugmail: review+
Details | Diff | Splinter Review

Description Michael Morgan [:morgamic] 2007-12-17 07:37:28 PST
Review counts are needed in 3.2's redesign, and I don't want to have to do an extra query on the reviews table to get this info.

For the same reason we have flattened out average rating, weekly and total downloads, etc.

So I'd like an additional field added to addons named 'reviews' that's an unsigned int(11) and also we will need another action in maintenance.php to update these counts (read from slave, update master).
Comment 1 Michael Morgan [:morgamic] 2008-01-16 10:00:45 PST
Created attachment 297373 [details] [diff] [review]
v1, adding column to addons and case to maintenance script

This depends on fligtar's patch for maintenance.php.

Need to add reviews to addon model... will reupload after meeting.
Comment 2 Michael Morgan [:morgamic] 2008-01-28 22:58:19 PST
Created attachment 299951 [details] [diff] [review]
v1.5, fixes maint script col name and adds column to addon model

When we push this, we will need to have this run on prod:

alter table addons add column `totalreviews` int(11) unsigned NOT NULL default '0'
Comment 3 Fred Wenzel [:wenzel] 2008-01-29 05:20:04 PST
Comment on attachment 299951 [details] [diff] [review]
v1.5, fixes maint script col name and adds column to addon model

Yes, this looks good.

You want to use it in the stars element too, I assume.
Comment 4 Justin Scott [:fligtar] 2008-02-14 16:34:44 PST
This is live.

Note You need to log in before you can comment on or make changes to this bug.