I'm tired of seeing this error using the South and yes, switching to PostgreSQL has expelled it!
The mysql2postgres application written in Ruby, suggested in the comments above, does not work for me (it will start, display some data on the screen, but not copy any data lines, for me). I do not know why. But with joy there rewrites Python, which worked flawlessly (for me, after all):
http://pypi.python.org/pypi/py-mysql2pgsql
The only thing I found is:
Initially, I thought it would be safer to set up tables in PostgreSQL db via syncdb, and then only transfer data. I tried this, but the tables are wrapped alphabetically, and this violates the foreign key restrictions for some tables (rows refer to rows in tables that have not yet been imported).
Then I tried structure + data transfer. This migrated fine, but I ran into some problems in Django, especially with the admin site. It appears that the migration script has created some table restrictions from what Django would have.
I solved this by hacking a mysql2pgsql script to respect the table order specified in the yml config only_tables
, and then only migrate with + synchronization. With trial and error, I shuffled the ordering of the tables for my migration until all of them were successfully imported.
UPDATE:
My hack request described above was accepted, so you can do it now from the main version:
https://github.com/philipsoutham/py-mysql2pgsql
source share