migration - Django 1.8 Syncdb vs migrate -


i have created model , executed syncdb had created tables model designed.
afterwards modified model , executed makemigrations created migrations ignoring tables syncdb had created.

so ended error "relation exists".

why did makemigrations created scratch? how fix situation ?

makemigrations creates new migrations based on changes detected models.

also, 1 thing note syncdb command deprecated since django 1.7 , removed in django 1.9. so, should use migrate command.

from syncdb docs:

deprecated since version 1.7:
command has been deprecated in favor of migrate command, performs both old behavior executing migrations.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -