Unaware of the new manage.py dumpdata and loaddata commands, I've
written a tool (dbpickle.py) for dumping and loading Django databases.
I've used it both for moving data from one database engine to another
and for migrating schema changes to production databases.

I wonder if it would be possible to use dumpdata and loaddata for
migration instead.

The migration approach I took was to allow for plugins to hook on
dbpickle.py's object retrieval and saving. This way I can add/remove/
rename fields of objects on the fly when loading a dumped database.
It's also possible to populate new fields with default values or even
values computed based on the object's other properties.

I include a database migration plugin with my projects for each schema
change and use them with dbpickle.py.

For the source code, see:
http://trac.ambitone.com/ambidjangolib/browser/trunk/dbpickle/dbpickle.py

Any thoughts about the feasibility of this with dumpdata/loaddata? It
would be great to have this kind of functionality in Django and have
it done The Right Way.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to