Pgloader: A High-Speed PostgreSQL Swiss Army Knife, Written in Lisp
pgloader.io
pgloader.io
I had the some trouble with MySQL accepting invalid dates (like 0000-00-00) while Postgres rejects such dates. However, there was an option to convert such dates to NULL which saved the day.
Also you have to manually rewrite your views. Since we had a lot and also very complicated views I ended up materializing each MySQL view, manually porting it to Postgres and then comparing the result. That worked quite well.
In 2013 I was migrating a mysql database to postgres, for a tech demo as I'm a bit of a fan of postgres.
What followed was pgloader spitting out millions of errors, I assumed I had used the tool wrong or it was broken; but the more I looked at it the more I realised that we'd been suffering silent data corruption for years- and postgresql wouldn't validate the invalid data.
Oh, and the datetime thing, that was annoying. Fun things used to happen with mysql when you had a NOT NULL constraint but didn't specify a default.
Might be viable if you have time to do that but if not strongly consider writing your own migration scripts in python or whatever you already know.
First is writing your own tool with the connector libraries working fine on windows sql server in the lang of your choice which is great if you have to do transformation on the data for whatever reason while you are importing - the second is dumping from mssql to csv, then loading it in, which is honestly the KISS way to go as long as that is all you need to do.
Best of luck!
https://dev.to/narayandreamer/mysql-to-postgres-migration-us...
I recommend the Docker image over downloading and running it locally anyways tbh -- you can just prune Docker images to remove stuff without needing to remember to delete it, and you don't have to copy it to your bin dir in PATH.