-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add autoValue for created_at and updated_at #1661
Conversation
@brylie reviewing |
} else { | ||
this.unset(); // Prevent user from supplying their own value | ||
} | ||
}, | ||
}, | ||
created_by: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brylie I think we should add value on creation for this, if we want to keep this field and make use of it at some point.
if (this.isUpdate) { | ||
return new Date(); | ||
} | ||
}, | ||
}, | ||
updated_by: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also value here on update.
Merging |
Closes #1595
Closes #1652
Changes
created_at
field on insertupdated_at
field on update