开发者

Making a django blog: says database column is missing when 'sql' shows the column exists

开发者 https://www.devze.com 2023-01-29 06:23 出处:网络
here is the error in question: 开发者_运维百科I\'ve run syncdb and restarted the server.The \"sql\" command shows what SQL would be run by syncdb, not what columns actually exist currently in the ta

here is the error in question:

Making a django blog: says database column is missing when 'sql' shows the column exists

开发者_运维百科

I've run syncdb and restarted the server.


The "sql" command shows what SQL would be run by syncdb, not what columns actually exist currently in the table; double-check the column existence in a DB tool.

syncdb won't add columns to existing tables, only create brand new ones. You'll want to look at a project like South http://south.aeracode.org/ to manage adding comlumns (or run the alter table add column manually.)

0

精彩评论

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