Closed Bug 945905 Opened 11 years ago Closed 11 years ago

Marketplace table has 2 similar unique keys

Categories

(Marketplace Graveyard :: Code Quality, defect, P2)

Avenir
x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
2013-12-10

People

(Reporter: scabral, Assigned: robhudson)

Details

(Whiteboard: [qa-])

The webapps_iarc_info table has a unique key on addons_id, and it looks like it recently added another unique key on (addon_id, submission_id).

Did you mean to remove the unique key on just (addon_id)? Otherwise adding a unique key on (addon_id, submission_id) just creates more work on each wrote.

(marking this confidential just in case it is, but if it's not feel free to unset the flag).

MariaDB [addons_mozilla_org]> show create table webapps_iarc_info\G
*************************** 1. row ***************************
       Table: webapps_iarc_info
Create Table: CREATE TABLE `webapps_iarc_info` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  `addon_id` int(11) unsigned NOT NULL,
  `submission_id` int(11) unsigned NOT NULL,
  `security_code` varchar(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `addon_id` (`addon_id`),
  UNIQUE KEY `addon_id_2` (`addon_id`,`submission_id`),
  CONSTRAINT `addon_id_iarc_info` FOREIGN KEY (`addon_id`) REFERENCES `addons` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
Group: mozilla-corporation-confidential
Assignee: nobody → robhudson.mozbugs
Priority: -- → P2
https://github.com/mozilla/zamboni/commit/a4d5e5f
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
Target Milestone: --- → 2013-12-10
You need to log in before you can comment on or make changes to this bug.