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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message