PostgreSQL → MySQL
Convert PostgreSQL interval to MySQL
MySQL has no interval column type at all. The honest mapping is text — keeping the values readable — plus application-side parsing where you need arithmetic.
interval → VARCHAR(255)
What to know
- interval → VARCHAR(255) holding values like '1 day 02:30:00'
- Date arithmetic moves into queries: DATE_ADD(ts, INTERVAL 90 MINUTE)
- If all your intervals are seconds-based, an INT seconds column is a cleaner redesign
- This is a lossy mapping by nature — it's always flagged in the conversion report
Before / after
PostgreSQL
retry_after interval DEFAULT '15 minutes' MySQL
retry_after VARCHAR(255)
-- value: '0:15:00' 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 converterSee the full type mapping table or all guides.