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
updated_at columns are very common. MySQL supports the ON UPDATE CURRENT_TIMESTAMP shortcut that makes the column value change to current date and time on every record update.
Currently, we don't have a built-in way that supports it.
We have an onUpdate method on the column definition builder, but it only supports foreign key actions as strings.
Hey 👋
updated_at
columns are very common. MySQL supports theON UPDATE CURRENT_TIMESTAMP
shortcut that makes the column value change to current date and time on every record update.Currently, we don't have a built-in way that supports it.
We have an
onUpdate
method on the column definition builder, but it only supports foreign key actions as strings.Users are forced to:
everywhere, this is not ideal.
The easiest would be to add
'CURRENT_TIMESTAMP'
toonUpdate
's argument type, and parse it differently at runtime - no foreign key related nodes.Alternatively, we could introduce
onUpdateCurrentTimestamp()
.The text was updated successfully, but these errors were encountered: