I have created a model and executed syncdb which had created the tables as my model was designed.
Afterwards I modified the model and executed makemigrations which created the migrations ignoring the tables that syncdb had already created.
So I ended up with an error "relation already exists".
Why did makemigrations created everything from scratch? How do I fix this situation ?
makemigrationscreates new migrations based on the changes detected to your models.Also, one thing to note is
syncdbcommand is deprecated since Django 1.7 and will be removed in Django 1.9. So, you should use themigratecommand.From
syncdbdocs: