django syncdb and an updated model

后端 未结 7 1358
暗喜
暗喜 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:07

    Havent used django in a while, but i seem to remember that syncdb does perform alter commands on db tables. you have to drop the table then run again and it will create again.

    edit: sorry does NOT perform alter.

提交回复
热议问题