SwapSQL

PostgreSQL → MySQL

Convert PostgreSQL boolean to MySQL

MySQL's BOOLEAN keyword is just an alias for TINYINT(1), so true/false become 1/0. Queries keep working because MySQL treats them as truthy/falsy.

boolean TINYINT(1)

What to know

Before / after

PostgreSQL

active boolean NOT NULL DEFAULT true

MySQL

active TINYINT(1) NOT NULL DEFAULT 1

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.