Skip to content

Add delete_missing option to sync commands#21

Merged
bdurand merged 2 commits intomainfrom
delete-missing-option
May 8, 2026
Merged

Add delete_missing option to sync commands#21
bdurand merged 2 commits intomainfrom
delete-missing-option

Conversation

@bdurand
Copy link
Copy Markdown
Owner

@bdurand bdurand commented Feb 24, 2026

Added

  • Added delete_missing option to sync_table_data! and sync_all!. When set to true, any records in the database that are not defined in the data files will be deleted. This option defaults to false to preserve backward compatibility.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an opt-in delete_missing keyword to the support-table sync APIs so consumers can remove database rows that are no longer present in the data files, while keeping the default behavior backward-compatible (no deletions).

Changes:

  • Add delete_missing: false keyword arg to sync_table_data! and propagate it through SupportTableData.sync_all!.
  • Implement deletion of non-synced records when delete_missing: true.
  • Add specs + README documentation + version/changelog bump for the new option.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
VERSION Bumps gem version to 1.6.0.
spec/support_table_data_spec.rb Adds coverage for default non-deletion and opt-in deletion for both sync_table_data! and sync_all!.
README.md Documents delete_missing usage and adds cautions/tips for test setup.
lib/support_table_data.rb Implements delete_missing behavior in sync_table_data! and wires through sync_all!.
CHANGELOG.md Adds 1.6.0 entry describing the new option.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/support_table_data.rb Outdated
Comment thread lib/support_table_data.rb Outdated
@bdurand bdurand merged commit 1215a60 into main May 8, 2026
7 checks passed
@bdurand bdurand deleted the delete-missing-option branch May 8, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants