Answer the question
In order to leave comments, you need to log in
How can I specify a default value for a field in a Django model, applying this to the database schema?
I ran into a problem that the makemigration command does not add the default='value' value specified for the model attribute to the schema. The same goes for blank=True .
It turns out that I need to create migrations with pure sql to specify these parameters, or is there a more concise way?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question