I use south to port my django models. However, in the south there is an unpleasant mistake. It does not set default values ββin Postgres databases. Example:
created_at = models.DateTimeField(default = datetime.now) tag_id = models.PositiveIntegerField(default = 0)
The south will add these 2 fields to the database, but will not set their default values, which must be done manually.
Is there a patch for this error?
UPDATE I have already tried setting the default date using auto_now_add=True , but this also does not set default values. Adding null=True to the field adds a db.alter_column to the migration script created by the south. But this removes the NOT NULL , does not add a default value. Same for integer field
python django django-south
jerrymouse
source share