Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Limit the number of devices we delete at once #14649

Merged
merged 3 commits into from
Dec 9, 2022

Conversation

erikjohnston
Copy link
Member

Follow on from #14595

@erikjohnston erikjohnston marked this pull request as ready for review December 9, 2022 11:23
@erikjohnston erikjohnston requested a review from a team as a code owner December 9, 2022 11:23
Comment on lines -1617 to +1621
SELECT DISTINCT device_id FROM devices
SELECT device_id FROM devices
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why no longer DISTINCT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, presumably (user_id, device_id) is already unique

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was pointless mostly, as there are unique indexes on user_id / device_id

@erikjohnston erikjohnston enabled auto-merge (squash) December 9, 2022 11:30
@erikjohnston erikjohnston disabled auto-merge December 9, 2022 13:31
@erikjohnston erikjohnston merged commit 94bc21e into develop Dec 9, 2022
@erikjohnston erikjohnston deleted the erikj/prune_devices branch December 9, 2022 13:31
reivilibre added a commit that referenced this pull request Dec 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants