Docs/Streams/Database Guides/PostgreSQL

PostgreSQL to MySQL Schema Conversion

MySQL does not have PostgreSQL-style schemas as separate namespaces within a database. When the source is PostgreSQL and the target is MySQL, DBConvert Streams flattens schema-qualified table names using the following rule:

  • tables from the public schema keep the base table name
  • tables from non-public schemas get a schema prefix with a double underscore (__) separator
public.users           → users
public.orders          → orders
inventory.products     → inventory__products
sales.orders           → sales__orders
reporting.analytics    → reporting__analytics

Foreign key references are remapped the same way — if a FK points to inventory.products, the MySQL target FK points to inventory__products.

Name collisions

Review the source scope before running when multiple schemas contain tables with the same base name:

inventory.products     → inventory__products
sales.products         → sales__products       (no collision)

A collision can still occur if the target database already contains a table whose name matches the flattened output. Open the target in Data Explorer to check before starting.