mirror of
https://github.com/t8y2/dbx.git
synced 2026-11-02 08:30:35 +00:00
Time-related column types (DATE, DATETIME, TIMESTAMP, TIME, etc.) need their literal default values wrapped in single quotes. Previously, the normalize_default function returned values verbatim, so a DATETIME default like "2024-01-01 00:00:00" would generate invalid SQL: DEFAULT 2024-01-01 00:00:00 instead of: DEFAULT '2024-01-01 00:00:00' SQL expressions (CURRENT_TIMESTAMP, NOW(), etc.) are correctly left unquoted. Non-temporal types (INT, VARCHAR, etc.) are unaffected.