问题
I'm new to Python (2.7) and Django (1.5) and am working through the Django book whilst making a hobby site. I'm using Sqlite3 as dev db, but in production I intend to us MySQL. South looks like a great solution for database schema migration management, but it doesn't play well with Sqlite. I'm now tempted to install MySQL on my dev machine, but wonder if there's a way to avoid that. I'd appreciate knowing a simple, practical solution to this problem, if anyone knows of one.
Edit: I meant a programmatic solution (for those that feel this is off topic). I imagined there may be a way to use Django's settings.py and some custom code to accomplish this.
回答1:
No, there's no way around this. To use South properly you require complete ALTER TABLE
support which SQLite does not have.
This and other small differences will make developing on MySQL a better choice, especially if you plan to deploy to MySQL.
来源:https://stackoverflow.com/questions/17973720/using-django-south-and-sqlite-during-development