Django South migrations fails with column does not exist, for a column that hasn't been introduced yet -


on app running multiple migrations 0023-0027 in 1 go. first of migration complaining missing column not introduced until later.

running migrations blogs: - migrating forwards 0027_auto > blogs:0023_auto error in migration: blogs:0023_auto 

the error reads:

django.db.utils.databaseerror: column blogs_blog.author_bio not exist line 1: ...log"."author_name", "blogs_bl... 

so idea why migration 0023 fail missing column not introduced until migration 0027?

the problem auto-generated 0023 migration in forwards function had following in it:

        in blog.objects.all():             a.uuid = u'' + str(uuid.uuid1().hex)             a.save() 

that calls model based on latest content, author_bio in it. fix call model "orm" so:

        in orm.blog.objects.all():             a.uuid = u'' + str(uuid.uuid1().hex)             a.save() 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -