I’d like to add some default values to a model when I’m creating a new entry (like a timestamp)
I’m sure there are more than one way of doing this, I’m curious what the different ways are, but mostly what the standard way of doing this is.
Thanks
—edit—
solution:
for the timestamp the default would be
default: CURRENT_TIMESTAMP
Use the
defaultkey in your schema, like this:Works for all field types.