SwapSQL

PostgreSQL → MySQL

Convert PostgreSQL enum types to MySQL ENUM

PostgreSQL enums are named types shared across tables; MySQL enums are inline per-column. The labels and values survive, the type definition just moves into the table.

CREATE TYPE … AS ENUM ENUM(...)

What to know

Before / after

PostgreSQL

CREATE TYPE mood AS ENUM ('happy','neutral','sad');
mood mood DEFAULT 'happy'

MySQL

mood ENUM('happy','neutral','sad') DEFAULT 'happy'

Don't convert column-by-column — convert the whole database.

Upload a dump, get back ready-to-import SQL with this mapping (and every other one) applied.

Open the PostgreSQL → MySQL converter

See the full type mapping table or all guides.