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

10999_update_principaluser migration fails in certain circumstances #11664

Closed
bferguso opened this issue Dec 3, 2024 · 0 comments · Fixed by #11665
Closed

10999_update_principaluser migration fails in certain circumstances #11664

bferguso opened this issue Dec 3, 2024 · 0 comments · Fixed by #11665
Assignees

Comments

@bferguso
Copy link
Contributor

bferguso commented Dec 3, 2024

If upgrading an existing database that has resources created by a user that no longer exists, the migration fails due to a foreign key constraint violation (resource_instances.principle_user -> auth_user.id).

The second SQL statement should have a clause that excludes out any resources that were created by users that don't exist in the auth_user table.

NB - the fix requires an update to an existing migration rather than adding an additional migration due to the nature of the problem.

@chiatt chiatt added this to pipeline Dec 3, 2024
@bferguso bferguso self-assigned this Dec 3, 2024
@jacobtylerwalls jacobtylerwalls moved this to 👀 In Review in pipeline Dec 3, 2024
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in pipeline Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants