Open rpradal opened 2 years ago
Interesting @rpradal . At first glance I would do something like this:
class RemoveDefaultValue(AddDefaultValue):
def database_forwards(*args, **kwargs):
super().database_backwards(*args, **kwargs)
def database_backwards(*args, **kwargs):
super().database_forwards(*args, **kwargs)
Can you see if that approach works for you?
Hi,
I am trying to add a new non nullable field on a model in a backward compatible way. I understood clearly what this library achieves, but i am wondering how i can clear the default at the end.
For my first migration i have the following operations :
And for the second one :
This second migration does not generate any sql code so i end up with a remaining default at db level.
If there a way to remove the db level default introduced by
AddDefaultValue
?Thanks