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

Migrate models to use OpportunityAccess as forieng key #242

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

pxwxnvermx
Copy link
Contributor

@pxwxnvermx pxwxnvermx commented Jan 24, 2024

Ticket

This is Part 1 of the Migration which creates the field and populates it. All the code related to refactoring the usage of Opportunity Access will be in a second PR to keep the diff small enough to review.

@pxwxnvermx pxwxnvermx self-assigned this Jan 24, 2024
)
app = models.ForeignKey(CommCareApp, on_delete=models.PROTECT)
opportunity = models.ForeignKey(Opportunity, on_delete=models.PROTECT)
opportunity_access = models.ForeignKey(OpportunityAccess, on_delete=models.CASCADE, null=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

)
module = models.ForeignKey(LearnModule, on_delete=models.PROTECT)
opportunity = models.ForeignKey(Opportunity, on_delete=models.PROTECT)
opportunity_access = models.ForeignKey(OpportunityAccess, on_delete=models.CASCADE, null=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only this line was added and the model was moved to be below OpportunityAccess to avoid any undefined warnings.

@pxwxnvermx pxwxnvermx force-pushed the pkv/standardize-opportunity-access-use branch 2 times, most recently from ec70316 to 33b91af Compare January 24, 2024 09:27
@pxwxnvermx pxwxnvermx marked this pull request as ready for review February 22, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants