开发者

model django new tables

I just created all the DB tables from one model with 6 classes.

In one of them I would like to add a NEW field.

I did that and hit: python manage.py syncdb.

But Django won't add that c开发者_JS百科olumn in that table.

Am I missing something?

How can i add columns/tables AFTER I already created the db in Django.

Thanks!


You need to use a migration tool such as South.


Chapter 10 of the Django book has a section called 'Making Changes to a Database Schema' with a sub-section titled 'Adding Fields'...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜