Disclosure: I'm the author of dbSlice, the Windows tool used below. The routine itself works with any tool; here is how I run it when an application is rebuilt on PostgreSQL but the data still lives in MySQL, MariaDB or SQL Server.

1. Pick the goal

The wizard opens with eight goals (migrate tables, keep tables up to date, compare data, send rows to an API or queue, export to a file, generate test data, clone tables, load data). Here: Migrate tables.

dbSlice wizard, step 1: pick a goal

2. Connect

Source (MySQL, MariaDB or SQL Server) and target (PostgreSQL).

3. Choose the tables

If a table does not exist in the target, nothing is written: the tool shows the CREATE TABLE, translated from the source, for you to review and run. Check what never translates on its own:

  • UNSIGNED integers: use BIGINT (or NUMERIC(20) for BIGINT UNSIGNED)
  • TINYINT(1) flags: declare them BOOLEAN
  • zero dates (0000-00-00): PostgreSQL rejects them; turn them into NULL in a SELECT used as the source

4. Options

Pick a key column and a mode: initial load first, then upsert by key while the old application is still running.

5. Run and compare

Run it, then compare key by key against the source. That tells you which rows are missing or different. A structure compare lists column differences:

Compare structure screen

What it does not do

It moves data, not stored procedures, triggers or views. Incremental runs do not detect deletes at the source, so do a full compare or a reload before cutover.

Try it

There is a free version on the Microsoft Store (connects, browses, compares, exports CSV). Copying into the target needs a license.

Questions about the type mapping or how the compare works? Ask below.