You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like .defaultTo is not using bindings to pass the value (not sure if db drivers even support using bindinds there).
That could be fixed or documented better.
Anyways it seems that if object is passed there .toString() is used to convert the value to SQL and server does not understand that timeformat. You could do .defaultTo(new Date(0).toISOString()) to use iso format for passing the datetime...
Environment
Knex version: 0.16.3
Database + version: Postgresql 10.3
OS: MacOS
Problem
Trying to set a Date as timestamp column default fails:
complains
This works:
The text was updated successfully, but these errors were encountered: