Django Migration File with Invalid import (import no longer exists)

25 views
Skip to first unread message

Ray Leyendecker

unread,
Dec 5, 2016, 1:22:15 PM12/5/16
to Django users
I recently update the oauth2 library I am using in my project.
There are now import references in my (already run) migration files that no longer exist (as a result of the oauth2 upgrade).
As a result the make migrations command fails.

How is the best way to handle this problem?

I am also running my project on AWS (Amazon Web Services) so a solution that can be applied to that environment we be much appreciated.

Thanks 

Tim Graham

unread,
Dec 5, 2016, 2:40:01 PM12/5/16
to Django users
Hi Ray,

Follow the advice at https://docs.djangoproject.com/en/stable/topics/migrations/#historical-models :

"To remove old references, you can squash migrations or, if there aren’t many references, copy them into the migration files."
Reply all
Reply to author
Forward
0 new messages