twenty
twenty copied to clipboard
Fix implementation of updatedAt
3 issues:
- As of today updatedAt column is not updated when we update the record*
- While updatedAt exists on the table it's not visible in the metadata management page of the object and can't be displayed as a column
- Bonus (probably hard): touch() parent record when child is updated to reflect it on parent too. Create a separate issue to track this for later if it's not achievable as part of this one
*I'd guess we need to change update-one-query-factory and update-many-query-factory, but tbc if it's correct.
Hey @FelixMalfait, Can I take this up? Thanks! 😄
- As of today updatedAt column is not updated when we update the record*
- While updatedAt exists on the table it's not visible in the metadata management page of the object and can't be displayed as a column
I found the fix for this.
Bonus (probably hard): touch() parent record when child is updated to reflect it on parent too. Create a separate issue to track this for later if it's not achievable as part of this one
A little confused here, do you mean if the field we are updating has a parent relation, then that parent schemas updatedAt should be updated too?
@AdityaPimpalkar nice to see you again! Not many people daring to touch the backend since the refactoring haha
Yes I was thinking of something like this: https://laravel.com/docs/5.3/eloquent-relationships#touching-parent-timestamps
But it might be hard to achieve (no idea) - so feel free to just pass on that, we can always recreate an issue just for this