On Sunday 07 May 2017 03:54:39 hamza bouissi wrote: > after I add new model and delete all other models and their migration > files
You still have a reference to one of the deleted models in your urls or a view that is referenced by that url. Also, this isn't the way to do it. First make a migration for the removed models, then add the new model and it's migration. Then run squashmigrations, start at the first migration and end with the last. In theory you should be left with only 1 operation, the one that creates the new model. If you then run migrate, the database will be migrated correctly using all individual migrations but new installs will only use the squashed migration. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1739662.Q66xm6bz21%40devstation. For more options, visit https://groups.google.com/d/optout.