DEFAULT now() in CREATE TABLE fails #10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
DEFAULT now()in a column definition causes a SQLite syntax error:Workaround
Use
DEFAULT CURRENT_TIMESTAMPinstead (a keyword, not a function call):Expected
The DDL translator should rewrite
DEFAULT now()toDEFAULT CURRENT_TIMESTAMP(orDEFAULT (datetime("now"))) so it works against SQLite, matching PostgreSQL behaviour wherenow()andCURRENT_TIMESTAMPare equivalent.Migrated from Codeberg: originally #10, opened 2026-04-13.