Remove addontype_id from collections table

RESOLVED FIXED in BW-M1

Status

RESOLVED FIXED
10 years ago
3 years ago

People

(Reporter: rdoherty, Assigned: rdoherty)

Tracking

unspecified
BW-M1

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
Creating collections on the bandwagon stage server was generating this error:

Cannot add or update a child row: a foreign key constraint fails (`addons_reskin/collections`, CONSTRAINT `collections_addontype_ibfk_1` FOREIGN KEY (`addontype_id`) REFERENCES `addontypes` (`id`))

I don't think we need the column addontype_id, but want to verify. I'll post a patch.
(Assignee)

Comment 1

10 years ago
Attachment #364150 - Flags: review?(fwenzel)
(Assignee)

Comment 2

10 years ago
SQL to run on production and bandwagon staging, I'm not sure why but this foreign key isn't in remora.sql, but was causing the error on the bandwagon staging server.



alter table collections drop foreign key collections_addontype_ibfk_1;
Attachment #364150 - Flags: review?(fwenzel) → review+
Comment on attachment 364150 [details] [diff] [review]
removed addontype_id column

I agree, we don't need to enforce collections that contain a single add-on type only.
(Assignee)

Comment 4

10 years ago
r22631 Will file IT bug
Status: NEW → RESOLVED
Last Resolved: 10 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.