On Tue, Jun 02, 2009 at 09:06:38PM -0700, Kegan wrote:
> 1. Use Django's management command "dumpdata" to get the JSON
> representative of an app. Save the JSON into a file (oldmodel.json).
> 2. Git pull the latest code. And do a reset to the app. So the
> database will have the new model schema now.
> 3. Use the python shell to migrate the JSON file to match the new
> model representation. Save the new JSON into a file (newmodel.json).
> 4. Use management command "loaddata" to populate the new model with
> the newmodel.json.

I tried this at one stage, and it seemed fine, until I realized non-ascii (UTF8
I think) characters were being siliently currupted.

Of course django has changed a lot since then so this may no longer be an issue.

I also tried sql dump with sql, however at the time I couldn't work out how to
get sqlite to dump that data with column names. So if the change meant the
columns were in a different order (or new columns between old columns), the
import would be wrong. As a result I migrated to mysql, which is more flexible.
-- 
Brian May <br...@microcomaustralia.com.au>

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to