-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(records): update records count when marking records as deleted #2935
Conversation
@@ -263,7 +263,7 @@ export async function upsert({ | |||
connection_id: connectionId, | |||
model, | |||
environment_id: environmentId, | |||
count: Math.max(0, delta) |
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.
unrelated but max was only useful when the counts were not populated yet for historic data. removing it since it doesn't bring anything
updated_at: now, | ||
sync_job_id: generation | ||
}) | ||
.returning('id')) as unknown as string[]; |
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.
this query hasn't changed. it is just wrapped in the transction
55136d3
to
84eb8fe
Compare
Column is called `Records` cc @bastienbeurier Count is shorten when greater than 1000. Ex: 1.6K, 3M. Non-shorten count is always shown in the hover tooltip  Depends on this [bugfix](#2935) to be merged first and inaccurate rows in the db to be fixed ## Issue ticket number and link https://linear.app/nango/issue/NAN-1929/[trial]-show-object-count-in-sync-tab ## Checklist before requesting a review (skip if just adding/editing APIs & templates) - [ ] I added tests, otherwise the reason is: - [ ] I added observability, otherwise the reason is: - [ ] I added analytics, otherwise the reason is:
Describe your changes
we forgot to update the records count when marking records as deleted when track_deletes = true