Julien wrote: > Hi, > > We're using SVN between several developers to work on the same project > and it's working quite well. But it's not as simple concerning the > database. > > Each of us has a local database to muck around with, and if one of us > makes a change in the models that implies modifying the database > manually (e.g. renaming a field, changing the type or the field, etc.) > that developer has to inform all others of the changes so they all > make the change manually on their own local database. > > Having a common database would avoid that, but that's not ideal since > an online database would be slower to access, and it could quickly go > out of control if many people add records or change the database > structure at the same time. > > So, I just wanted to get some advice from you as to what is the best > approach to go? > Not sure if it's quite an answer to your question, but I've been dealing with a similar problem which is how to keep the test data I've added to the system between (mostly minor) changes to the database. The approach I've taken is as follows:
- before making any changes use 'mysqldump -c -n -t databasename -p > dumpfile.sql' to dump the data only from the database, with column names included. - then clear the database using ./manage.py sqlclear - then change the model in models.py - then recreate the database structure using ./manage.py syncdb - then re-import the data using 'mysql -p -f databasename < dumpfile.sql' (try first without -f to check for errors). This seems to work pretty well for minor changes - e.g. making a field allow nulls, or adding a new non-relational field. andy. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---