I want to change my Model
class Source(models.Model):
release_date = models.DateField()
to
class Source(models.Model):
release_date = models.IntegerField()
as expected, I get an error
django.db.utils.DataError: (1264, "Out of range value for column 'release_date' at row 1")
What I actually want is, to only save the year in the IntegerField
as that is all I need. Is there a very intelligent way to take existing dates' year field and migrate it to the new IntegerField by altering the method
def forwards(self, orm):
If not, how at all can I change the fieldtype without loosing all data, loosing the stored dates, would be a price i'd pay.