How to easily switch from MySQL to PostgreSQL?

I would like to transfer my existing MySQL database (about 40 tables, 400 MB data) to Postgres before it gets bigger. I searched the website and tried some migration scripts (some of them can be found here ). None of them work without problems - if it were just a few crashes that I had to fix manually, this would not be a problem, but the resulting dumps do not look like valid PostgreSQL at all.

Did anyone manage to migrate the production table without using a full-time job - is there an easy solution to this problem?

Note. I will also consider commercial products (as long as the price is still possible).

+3
source share
1 answer

Although SQL is the standard, it is not fully functional to do without every server software that implements extensions. Migrating from MySQL to PostgreSQL is not easy, unless your schema is trivial. Automatic translation scripts will be available only to you.

The best approach is to translate the circuit and then write your own transfer scripts for the data itself. You should also write validation scripts to ensure that the schema and data are flowing correctly.

. , , . , script , , . , , PostgreSQL, MySQL, , , - .

.

+3

Source: https://habr.com/ru/post/1705665/


All Articles