issue with django 1.7 migrations and custom validators

105 views
Skip to first unread message

Jason Veatch

unread,
Aug 5, 2014, 10:33:16 AM8/5/14
to django...@googlegroups.com
I have a new django 1.7 project. I'm using sqlite now and moving to postgres soon. My initial migration (http://dpaste.com/2AW2ZEK) has a field with a custom validator (line 20). Now I've deleted that field and the validator function. When I run makemigrations it chokes because that function is gone: http://dpaste.com/2MX6RVX   

Work around is to add a no-op method to models.py, and I guess I could squash my migrations and then remove the old migrations and that unused function. I'm wondering if this is a bug with the migration system or a known pain-point of custom validators.

Collin Anderson

unread,
Aug 5, 2014, 11:02:25 AM8/5/14
to django...@googlegroups.com
It's a known pain-point of migrations.
Reply all
Reply to author
Forward
0 new messages