Skip to content

Add --preserve-jobs flag to CLI and GUI installers#326

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/preserve-jobs
Feb 26, 2026
Merged

Add --preserve-jobs flag to CLI and GUI installers#326
erikdarlingdata merged 1 commit intodevfrom
feature/preserve-jobs

Conversation

@erikdarlingdata
Copy link
Owner

Summary

  • Adds --preserve-jobs CLI flag and GUI checkbox to keep existing SQL Agent jobs untouched during upgrades
  • Existing jobs (owner, schedule, notifications) are preserved; only missing jobs are created
  • Uses a @preserve_jobs T-SQL variable — C# flips 0 to 1 via string replace

Fixes #324

Test plan

  • Default install drops+recreates jobs (verified via date_created change on sql2022)
  • --preserve-jobs preserves existing jobs (verified date_created unchanged on sql2022)
  • Both installers build with zero errors
  • CI pipeline

🤖 Generated with Claude Code

Existing SQL Agent jobs (owner, schedule, notifications) are now
preserved during upgrades when --preserve-jobs is specified (CLI)
or the checkbox is checked (GUI). Missing jobs are still created.

Uses a @preserve_jobs variable in the T-SQL — the C# installer
flips it from 0 to 1 via string replace when the flag is set.

Fixes #324

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit bf69c20 into dev Feb 26, 2026
7 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/preserve-jobs branch February 26, 2026 20:53
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.

1 participant