diff --git a/resources/migrations/20180403131200-multiple-claims-in-pr.up.sql b/resources/migrations/20180403131200-multiple-claims-in-pr.up.sql index 1f05d4f..c7b29fb 100644 --- a/resources/migrations/20180403131200-multiple-claims-in-pr.up.sql +++ b/resources/migrations/20180403131200-multiple-claims-in-pr.up.sql @@ -1,7 +1,6 @@ ALTER TABLE pull_requests DROP CONSTRAINT pull_requests_pkey; ALTER TABLE pull_requests DROP CONSTRAINT pull_requests_pr_id_key; -DELETE FROM pull_requests p WHERE NOT EXISTS (SELECT issue_id FROM issues i where p.issue_id=i.issue_id); ALTER TABLE pull_requests ADD CONSTRAINT pull_requests_pkey PRIMARY KEY (pr_id, issue_id); ALTER TABLE pull_requests ADD CONSTRAINT pull_requests_pr_id_key UNIQUE (pr_id, issue_id); ALTER TABLE pull_requests ADD CONSTRAINT pull_requests_fkey FOREIGN KEY (issue_id) REFERENCES issues(issue_id);