-
Notifications
You must be signed in to change notification settings - Fork 603
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
Use custom auto-attributes if specified in the model #946
Conversation
Is there any reasonable way to refactor this so that the |
3fd671b
to
70e1467
Compare
@devinivy Done Please be aware that now it needs the other PR on |
✔️ Love it! |
I'm good with this ✅ Just to be clear, in order to merge this PR we first need to:
Right? |
And update docs? |
Probably https://github.com/balderdashy/waterline-docs/blob/master/models.md will need an update. |
This documentation goes with this pullrequest [waterline/#946](balderdashy/waterline#946) that allows users to specify custom attribute names for the automatic timestamps `createdAt` and `updatedAt`.
@dmarcelino that sounds about right! Just added a PR for the documentation, feel free to change the wording if needed. |
It seems the linting changes created a merge conflict. We'll need to address those before merging this PR. |
Yeah looking at it now |
Rebased and submitted again as #1090 |
@dmarcelino @devinivy should we also go ahead and look at adding the same logic for |
Seems like that would keep things nice and symmetrical! |
Yes, I think it makes sense for Thanks @Esya! 🍻 |
This pullrequest goes along with the one I did for water-line schema here and implements #754
It allows users to specify custom names for the automatic timestamp attributes, they just need to pass a string instead of
true
orfals
e.Let me know if it is fine like this and I will update the documentation accordingly.
The Travis build will fail while the PR on waterline-schema is not merged, because my tests will not succeed, but all the older tests remain intact
Edit by @dmarcelino: Pending tasks: