Add application_id to collections

RESOLVED FIXED in BW-M4

Status

addons.mozilla.org Graveyard
Collections
P1
normal
RESOLVED FIXED
9 years ago
2 years ago

People

(Reporter: fligtar, Assigned: wenzel)

Tracking

unspecified
BW-M4

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

9 years ago
Collections should be associated with a particular application, e.g., a Firefox collection or Thunderbird collection. Add-ons in the collection might support multiple apps, but an add-on shouldn't be in a collection if it *doesn't* support that application.

On the website when making a collection, the app will default to whatever app the user's currently browsing the AMO site in, and can be changed from the manage collections page. From the API, the application should always be Firefox.
(Reporter)

Updated

9 years ago
Priority: -- → P1
Assignee: nobody → fwenzel
(Assignee)

Updated

9 years ago
Blocks: 456132
(Assignee)

Comment 1

9 years ago
Created attachment 372866 [details]
SQL: Add application_id to collections table
(Assignee)

Comment 2

9 years ago
Created attachment 372867 [details] [diff] [review]
Patch, rev. 1

Saves the application ID when creating a new one. Adds the app id to the API's XML results (tests updated, too).

Note: When creating a collection from the API, it is possible to choose the app, though it *defaults* to Firefox.
Attachment #372867 - Flags: review?(lorchard)
(Assignee)

Updated

9 years ago
Status: NEW → ASSIGNED
Comment on attachment 372867 [details] [diff] [review]
Patch, rev. 1

One issue in the remora.sql:

CONSTRAINT `collections_ibfk_1` FOREIGN KEY (`application_id`) REFERENCES `remora_prod`.`applications` (`id`)

Once I removed the "`remora_prod`." in the REFERENCES, all the tests passed and things look good - r+ with that caveat.
Attachment #372867 - Flags: review?(lorchard) → review+
(Assignee)

Comment 4

9 years ago
Thanks, I missed that.
(Assignee)

Comment 5

9 years ago
Created attachment 372871 [details]
Fixed SQL
Attachment #372866 - Attachment is obsolete: true
(Assignee)

Comment 6

9 years ago
Thanks, I committed this to r24446 and added the SQL to be ran to the wiki page.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.