I would like to convert my Django project database from MySQL to PostgreSQL. Unfortunately, I cannot just use the Django management commands "dumpdata" and "loaddata" because my database tables are too large. I already read the article http://www.ofbrooklyn.com/2010/07/18/migrating-django-mysql-postgresql-easy-way/ , but it seems that to use this method in practice, I still need to turn it into something like a control command that iterates over available models when it copies model instances and when it resets sequences. Moreover, it is not very fast, because it calls save () for each instance of the model.
Is there a better way to migrate? Actually, I would prefer to do "mysqldump", somehow convert the dump from MySQL to PostgreSQL format, and then load it into PostgreSQL. What part of the software would you recommend to perform such a dump conversion and correctly convert from MySQL data types to PostgreSQL, for example tinyint (1) to boolean?
Edit Thank you all for your help. I successfully migrated my database using the utility https://github.com/maxlapshin/mysql2postgres . However, I still had to reset the sequences in the resulting PostgreSQL database after importing the dump.
source share