Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken migration when records are orphaned in gosec_repo_scans #772

Closed
amenowanna opened this issue Jan 26, 2023 · 0 comments · Fixed by #773
Closed

Broken migration when records are orphaned in gosec_repo_scans #772

amenowanna opened this issue Jan 26, 2023 · 0 comments · Fixed by #773
Assignees
Labels
bug Something isn't working schema Anything that modifies the Postgres schema

Comments

@amenowanna
Copy link
Contributor

When gosec_repo_scans was originally added it did not have a constraint for a foreign key reference to repos.id. This allowed for a scenario where records were orphaned on this table when a repo was deleted. When we now run migration #22 to add the constraint it fails because the orphaned records are present. We need to delete the orphaned records before applying the new contraint.

@amenowanna amenowanna self-assigned this Jan 26, 2023
@amenowanna amenowanna added bug Something isn't working schema Anything that modifies the Postgres schema labels Jan 26, 2023
amenowanna added a commit that referenced this issue Jan 26, 2023
This resolves #772 and bumps the version to 1.13.0-beta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working schema Anything that modifies the Postgres schema
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant