django syncdb and an updated model

后端 未结 7 1354
暗喜
暗喜 2020-12-22 18:43

I have recently updated my model, added a BooleanField to it however when I do python manage.py syncdb, it doesn\'t add the new field to the database for the mo

7条回答
  •  甜味超标
    2020-12-22 19:20

    From Django 1.7 onwards

    Django has built in support for migrations - take a look at the documentation.

    For Django 1.6 and earlier

    Django doesn't support migrations out of the box. There is a pluggable app for Django that does exactly that though, and it works great. It's called South.

提交回复
热议问题