문제

I'm beginner in Django.

I come across South in some apps' documentation. And I wanted to know what is it.

"South is a tool to provide consistent, easy-to-use and database-agnostic migrations for Django applications."

I read about it but can't determine what it does exactly.

도움이 되었습니까?

해결책 2

South helps to keep your databases in sync with your models. Django's "syncdb" function will only create tables, not modify. Rather than modifying the tables by hand, south takes a snapshot of the models and creates/runs "migration" code to get the database up to (or back to) this model snapshot.

This is especially helpful when you're working on a team where each dev has a VM with their own DB or if you're moving from a QA database to a Production database.

다른 팁

Prior to Django 1.7, there was no built-in way to do migrations when you made a change that affected the structure of your database (e.g., changed around the fields on a model).

South is one of the most popular third-party tools to fill this gap. It can automatically detect such changes and write migrations for you, as well as giving you the toolset to write migrations by hand yourself for more complex cases.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top