Fix/batch processing schema mismatch#102
Merged
zephyranthes03 merged 2 commits intostagingfrom Jan 21, 2026
Merged
Conversation
The batch processing functions were using columns that don't exist in the actual database schema. This fix aligns them with the existing working functions. DB Schema Analysis: - watchers table: id, watcher_id, local_group_id, account_hash, group_id, title, folder, pattern, interval_seconds, is_recursive, created_at, updated_at, is_active, extra_json, is_deleted, deleted_at - watcher_conditions table: separate table for conditions (not a column) - watcher_groups table: no watcher_ids column Fixes: 1. get_all_groups_with_watchers: - Remove non-existent columns: preset_id, conditions - Use correct JOIN column: w.group_id (not w.server_group_id) - Add missing columns: is_recursive, extra_json - Fetch conditions from watcher_conditions table separately 2. batch_upsert_watchers: - Use correct column names matching existing upsert_or_create_watcher - group_id = server's watcher_groups.id - local_group_id = client's group ID - Insert conditions into watcher_conditions table (not a column) 3. batch_soft_delete_groups: - Use correct column: group_id (not server_group_id) for watchers table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.