Add support for reviews column in addons table

RESOLVED FIXED in 3.2

Status

addons.mozilla.org Graveyard
Administration
RESOLVED FIXED
10 years ago
a year ago

People

(Reporter: morgamic, Assigned: morgamic)

Tracking

unspecified

Details

Attachments

(2 attachments)

(Assignee)

Description

10 years ago
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).
(Assignee)

Updated

10 years ago
Assignee: nobody → morgamic
(Assignee)

Comment 1

10 years ago
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.
(Assignee)

Updated

10 years ago
Attachment #297373 - Attachment is patch: true
Attachment #297373 - Attachment mime type: application/octet-stream → text/plain
(Assignee)

Comment 2

9 years ago
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'
Attachment #299951 - Flags: review?(fwenzel)
(Assignee)

Updated

9 years ago
Keywords: push-needed
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.
Attachment #299951 - Flags: review?(fwenzel) → review+
Blocks: 415184
(Assignee)

Updated

9 years ago
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
This is live.
Keywords: push-needed
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.