Skip to content

sp_IndexCleanup: preserve UNIQUE in merge scripts + adversarial tests#728

Merged
erikdarlingdata merged 1 commit intodevfrom
fix/indexcleanup-tests-and-preserve-unique
Mar 26, 2026
Merged

sp_IndexCleanup: preserve UNIQUE in merge scripts + adversarial tests#728
erikdarlingdata merged 1 commit intodevfrom
fix/indexcleanup-tests-and-preserve-unique

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

Closes #724, closes #726

🤖 Generated with Claude Code

…suite

Bug fix (#724): Merge scripts now check is_unique on the index being
scripted, so unique constraints and unique indexes get CREATE UNIQUE
INDEX in the generated script.

New adversarial test suite (sp_IndexCleanup/tests/):
- adversarial_test.sql: 7 test groups covering UC subsets, sort
  direction, filtered indexes, include merges, indexed views, heaps,
  and cross-table isolation
- run_tests.py: automated test runner with expected-result validation

Closes #724, closes #726 (test design issue, not a bug)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit b30766c into dev Mar 26, 2026
@erikdarlingdata erikdarlingdata deleted the fix/indexcleanup-tests-and-preserve-unique branch April 6, 2026 13:15
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