On 11/3/06, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> Russell Keith-Magee wrote:
> > The easiest way I can think of would be to use the serializers;
> > serialize the contents of the MySQL database, and deserialize it into
> > SQLite.
>
> I read the docs on this. Would the steps be something like this?
>
> * With database set to MySQL with content:
> * Serialize to whatever type seems best (python?).
Right so far. The choice of serializer should be much of a muchness.
Ideally, they should all work.
> * Switch settings to use SQLite
> * Deserialize into Python
>
> It's the last part that isn't well defined in the docs.
The serializer modeltests is probably your best bet if you are looking
for examples. However, it's a pretty straightforward interface -
for obj in serializers.deserialize("python", data):
obj.save()
There are three potential sources of problems that I can forsee:
1) Circular relationships between objects, and generally getting
dependencies saved in order
2) Handling of m2m relationships.
3) Serialization of NULL, empty string, etc - edge case values that
could confuse the serializers.
These bugs (if they exist) should all be squashable - we just need to
hit the API hard enough to expose them.
Yours,
Russ Magee %-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---