Ticket #361 (closed defect: duplicate)
Failure to handle default value containing '%' character
|Reported by:||michael.goffioul@…||Owned by:||andrew|
South fails to handle text fields with default value containing '%' character. Let's say I have a model:
class A(models.Model): f = models.CharField(max_length=100, default='My %(string)s')
The initial migration script generated by south will fail to run, because somewhere in the process, a string formatting will take place, trying to replace '%(string)s', and fail. I have to hand-edit the migration script and replace '%' with '%%'. "./manage.py syncdb" on a cleaned DB works fine, though.
If I make further changes to the model and create a new migration script, south will think the default value of field 'f' has changed (because of the previous hand-editing) and include it into the new migration script.