For some reason you need to migrate an existing database from MySQL to PostgreSQL and then you find out that this might not be an easy task.
I just found a Python package that will make the hard work for you. Assuming you already have the Python setuptools package installed, you can just:
pip install py-mysql2pgsql
So run it. At the first time it will generate a config file:
mysql2pgsql.yml with the MySQL and PostgreSQL settings.
Run it again to migrate your database:
For more info, take a look at: