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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -