Ticket #151 (closed defect: wontfix)

Opened 7 years ago

Last modified 6 years ago

Auto resets my databases default for datetime values everytime I migrate

Reported by: erik@… Owned by: andrew
Priority: major Milestone: 0.6
Component: migrations Version: 0.6-pre
Keywords: default auto Cc:



Everytime I run an "auto" migration, South updates my DateTimeField? default value in my database to the current datetime.

My model is setup like this:
created = models.DateTimeField?(default=datetime.datetime.now, editable=False)

South should ignore the default in this case.


example.py (1.6 KB) - added by erik@… 7 years ago.

Change History

comment:1 Changed 7 years ago by andrew

  • Status changed from new to assigned

Do you mean it makes a migration with alter_column in it each time? Could you attach one?

comment:2 Changed 7 years ago by andrew

  • Milestone set to 0.6

Changed 7 years ago by erik@…

comment:3 Changed 6 years ago by andrew

  • Status changed from assigned to closed
  • Resolution set to wontfix

We won't fix this, as we don't like special cases. The recommended fix is to use auto_now or auto_now_add, or a pre_save signal.

Note: See TracTickets for help on using tickets.