Skip to content

Commit

Permalink
Fix V96 foreign keys migration
Browse files Browse the repository at this point in the history
  • Loading branch information
rmiccoli committed Nov 6, 2023
1 parent e1b596b commit 3c6d537
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ALTER TABLE authorization_code ADD CONSTRAINT FK_authorization_code_auth_holder_

-- APPROVED SITE

DELETE FROM approved_site WHERE client_id NOT IN (SELECT id FROM client_details);
DELETE FROM approved_site WHERE client_id NOT IN (SELECT client_id FROM client_details);
ALTER TABLE approved_site ADD CONSTRAINT FK_approved_site_client_id FOREIGN KEY (client_id) REFERENCES client_details (client_id) ON UPDATE CASCADE ON DELETE CASCADE;

DELETE FROM approved_site_scope WHERE owner_id NOT IN (SELECT id FROM approved_site);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ALTER TABLE authorization_code ADD CONSTRAINT FK_authorization_code_auth_holder_

-- APPROVED SITE

DELETE FROM approved_site WHERE client_id NOT IN (SELECT id FROM client_details);
DELETE FROM approved_site WHERE client_id NOT IN (SELECT client_id FROM client_details);
ALTER TABLE approved_site ADD CONSTRAINT FK_approved_site_client_id FOREIGN KEY (client_id) REFERENCES client_details (client_id) ON UPDATE CASCADE ON DELETE CASCADE;

DELETE FROM approved_site_scope WHERE owner_id NOT IN (SELECT id FROM approved_site);
Expand Down

0 comments on commit 3c6d537

Please sign in to comment.