copy mysql database fully in django -
my team building website in django. using mysql , database created project called 'vote'
we share code, problem whatever project team has added database has added me again,manually use it.
is there way in can copy whole database created team system?
thanks
there 3 approachs off top of head:
- export , import entire mysql database (using
mysqldump
or similar). - use django's fixtures system. allows dump contents of db json/xml files can loaded again later other members of team via
python manage.py loaddata ...
. these can quite temperamental in reality , find them more hassle worth implement. - use south's data migrations. south concerned managing schema migrations, i.e. gracefully handling addition , deletion of fields on models don't end inconstant db. can use write data migrations allow programatically add data db can share amongst team mates.
Comments
Post a Comment