Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Script to migrate data between engine types. #2
I'm currently toying with the different backends so I've tried to implement this at https://github.com/gryphius/pyzor/blob/feature_migrationscript/extra/pyzor-migrate.py
the script simply iterates over the source records and writes them the the destination backend which may not be the fastest possible way but gets the job done in a few lines of code
is this what the OP had in mind?
Haha, yes it's exactly what I had in mind. And this was the reason why I added the ability to iterate over engines in 71e13f2.
We don't really care about speed here, as it is only a simple utility script. But let's change to using
As this is more optimized for MySQL engine. Then submit it as a pull request. Thanks!
thanks for your feedback.. I tried to change to iteritems() according to your example , but this still causes the iterator to abort after the first exception. I guess if we want to do it this way, we'd have to do some exception handling in the iterators directly?