You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(api): consolidate device removal system into single collection
- Remove DeviceRemoved model and related APIs from store interface
- Update device deletion to use status "removed" instead of separate
collection
- Add DeviceCleanup cron job to permanently delete devices after 30 days
- Add migrations 103-106 to convert existing data and optimize
performance:
* Migration 103: Convert removed_devices to devices with status
"removed"
* Migration 104: Add devices_removed_count field to namespaces
* Migration 105: Drop obsolete removed_devices collection
* Migration 106: Add status+status_updated_at index for efficient
cleanup queries
- Update namespace limit checks to use devices_removed_count field
- Add "lt" and "gt" operator support for time.Time filtering
- Refactor DeviceList to use status-based acceptable logic instead of
lookup
- Update all tests to use new unified device management APIs
- Remove DeviceRemoved-related error types and helper functions
- Update fixtures and test data to include devices_removed_count field
- DeviceRemovedGet, DeviceRemovedInsert, DeviceRemovedDelete APIs
removed
- DeviceRemovedList replaced with DeviceList using status filter
- Error types ErrDeviceRemovedCount, ErrDeviceRemovedInsert, etc.
removed
Notes:
- Migration 103 rollback has known limitation: doesn't preserve original
device status before removal (devices will have status="removed" in
rollback instead of original pre-deletion status like "accepted")
0 commit comments