开发者

django-tagging loaddata error

开发者 https://www.devze.com 2022-12-09 17:47 出处:网络
I\'m trying to do a transition from MySQL to SQLite for a small site. django-tagging is used for one of the models. For the transition I\'m using the dumpdata » loaddata method.

I'm trying to do a transition from MySQL to SQLite for a small site. django-tagging is used for one of the models. For the transition I'm using the dumpdata » loaddata method.

The dumpdata command works fine to export everything from the MySQL database into JSON. When I try to run the loaddata command for the SQLite database, I get this error:

IntegrityError: column name is not unique

I have isolated this error to the tagging app. The loaddata command won't tell me more (the "verbose" and "traceback" settings don't help).

How can I find out what's wrong in the input data (the tags) so I can import it? Or is the开发者_JS百科re another way to do this whole thing?


It looks like doing

manage.py reset tagging

before running the loaddata command solves this problem.

0

精彩评论

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

关注公众号