I've read some questions about this issue in so, also this question is not giving the correct answer for my case:
I'm adding a created_time field in my already existing models, so no date in the mysql table belonging to the model.
class Configs(models.Model):
...
creation_date = models.DateTimeField(auto_now_add=True, blank=True)
...
I apply the migration using python manage.py makemigrations
And I get this error:
You are trying to add a non-nullable field 'creation_date' to collections without a default; we can't do that (the database needs something to populate existing rows). Please select a fix:
I tryed many options:
creation_date = models.DateTimeField(auto_now_add=True)
This one is giving the same error.
How can this migration be achieved, if USE_TZ in settings is set to False?
Btw, is this a bug in Django 1.9.4 makemigrations
script?