Skip to content
Discussion options

You must be logged in to vote

Hi @p-r-a-v-i-n, let me answer to your questions:

When we keep cascading on null=True and blank=True , i suppose django won't allow you migrate. we have to set on_delete=model.SET_NULL if we want to use null=True and blank=True .

This is not an issue which regards the migration system, migrations work fine and this is not an issue. This is a misleading way to view this issue.

for curiousity why this instead of unique_together ? i assume bcs you used cascading

The unique_together may be deprecated in the future (see django docs) and it is way less flexible than UniqueConstraint like in this case where there is a condition. To be completed in my code there is also an other condition whi…

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@sevdog
Comment options

Comment options

You must be logged in to vote
2 replies
@auvipy
Comment options

@sevdog
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by auvipy
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants