开发者

sycndb table already exists

开发者 https://www.devze.com 2023-02-07 20:44 出处:网络
History: I have been following \"The Definitive Guide to Django - 2nd Edition\" to Chapter 6, which means so far I have run syncdb successfully once.

History: I have been following "The Definitive Guide to Django - 2nd Edition" to Chapter 6, which means so far I have run syncdb successfully once.

Solution:

   1) As unix super user deleted ../mysql/data/books. 
   2) Added "II" to publisher and author table开发者_JAVA技巧s in the models.py.

Environment:

   solaris 5.10, django-1.2.4, mysql-5.5.8, python-2.4.6

Question:

   What file must I Delete/Modify the next time I want to start from scratch? 
   (ie re-run syncdb for the first time)

Thanks,

emilio


manage.py flush might be enough for you

For development and for learning it is more convenient to use sqlite database. Then you could simply delete one file.

If you need to delete mysql database, better do this with mysql command line tool and do not mess with mysql files. You can drop database like this:

mysql -u root -p

mysql> drop database dbname
0

精彩评论

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

关注公众号