Closed Bug 1320937 Opened 8 years ago Closed 8 years ago

Foreign key constraints missing from performance_datum in production

Categories

(Tree Management :: Perfherder, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: wlach)

References

Details

--- vagrant.sql 2016-11-25 17:22:53.439965200 +0000 +++ prod.sql 2016-11-25 17:31:49.775087600 +0000 ... -- -- Table structure for table `performance_datum` -- DROP TABLE IF EXISTS `performance_datum`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `performance_datum` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ds_job_id` int(10) unsigned NOT NULL, `result_set_id` int(10) unsigned DEFAULT NULL, `value` double NOT NULL, `push_timestamp` datetime(6) NOT NULL, `repository_id` int(11) NOT NULL, `signature_id` int(11) NOT NULL, `push_id` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `<INDEX_NAME>` (`repository_id`,`ds_job_id`,`push_id`,`signature_id`), UNIQUE KEY `<INDEX_NAME>` (`repository_id`,`ds_job_id`,`result_set_id`,`signature_id`,`push_timestamp`), KEY `<INDEX_NAME>` (`repository_id`,`signature_id`,`push_timestamp`), KEY `<INDEX_NAME>` (`repository_id`,`ds_job_id`), KEY `<INDEX_NAME>` (`signature_id`), KEY `<INDEX_NAME>` (`push_id`), KEY `<INDEX_NAME>` (`repository_id`), - CONSTRAINT `<INDEX_NAME>` FOREIGN KEY (`signature_id`) REFERENCES `performance_signature` (`id`), - CONSTRAINT `<INDEX_NAME>` FOREIGN KEY (`repository_id`) REFERENCES `repository` (`id`), CONSTRAINT `<INDEX_NAME>` FOREIGN KEY (`push_id`) REFERENCES `push` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */;
Flags: needinfo?(wlachance)
Fixed manually: mysql> set foreign_key_checks=0; Query OK, 0 rows affected (0.03 sec) mysql> alter table performance_datum add CONSTRAINT `performance_datu_repository_id_324d673b63e56275_fk_repository_id` FOREIGN KEY (`repository_id`) REFERENCES `repository` (`id`); Query OK, 0 rows affected (0.07 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> alter table performance_datum add CONSTRAINT `perform_signature_id_e06fd1b2be72806_fk_performance_signature_id` FOREIGN KEY (`signature_id`) REFERENCES `performance_signature` (`id`); Query OK, 0 rows affected (0.06 sec) Records: 0 Duplicates: 0 Warnings: 0
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(wlachance)
Resolution: --- → FIXED
(In reply to William Lachance (:wlach) from comment #1) > Fixed manually: Many thanks! I've also applied that to stage+dev (whilst we will reset them at some point, it would be good to keep them in sync if it's quick to do so :-)).
Assignee: nobody → wlachance
You need to log in before you can comment on or make changes to this bug.