Skip to content

Match SQLite GUID defaults to parameter storage without converting legacy defaults - #188

Merged
jogibear9988 merged 1 commit into
masterfrom
codex/kcc-v13-followup
Sep 22, 2026
Merged

jogibear9988 merged 1 commit into
masterfrom
codex/kcc-v13-followup

Conversation

@jogibear9988

@jogibear9988 jogibear9988 commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

SQLite GUID parameters are stored as blobs, but CLR Guid column defaults were rendered as text. A defaulted child key therefore failed foreign-key validation against an explicitly inserted parent with the same GUID, blocking KCC's tenant migration.

Render new Guid defaults using the same Guid.ToByteArray() representation as parameters. Preserve existing GUID default SQL as RawSql during metadata inspection so unrelated rebuilds retain legacy text values and defaults without silently changing storage classes. Existing mixed-format data still requires an explicit data migration.

Eight tests were added before the fix: six failed and two passed. All eight now pass across Microsoft.Data.Sqlite and System.Data.SQLite, covering empty/nonempty GUIDs, byte order, foreign keys, populated-table backfills, rebuilds, and legacy text defaults.

Validation:

  • Full solution build passed; 176 unit and 229 SQLite tests passed locally, with no skips.
  • All 12 database/unit CI matrix jobs and complete-test-coverage verification passed.
  • Downstream KCC full build passed after the required v13 consumer adaptations. All six focused migration checks passed, including the complete SQLite and SQL Server migration chains and populated/legacy schema transitions.
  • KCC unit suite: 763 passed, 0 failed, 3 skipped. Other tests: 80 passed, 0 failed, 2 skipped.
  • KCC full integration run: 1,662 passed, 489 failed, 8 skipped. One test used the wrong migration-history scope; its consumer-side correction passed a focused rerun. Latest per-test outcomes are 1,663 passed, 488 failed, 8 skipped. The full integration suite was not rerun after that test-only correction.
  • Remaining integration failures: 486 configured Oracle authentication/connection failures and two unrelated filter-fixture assertions caused by existing rows. Database configuration, integrity checks, and unrelated test behavior were left unchanged. KCC adaptations are in the separate consumer worktree, not this PR.

Copilot AI lite review requested due to automatic review settings September 22, 2026 22:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jogibear9988
jogibear9988 merged commit 87d4f1f into master Sep 22, 2026
13 checks passed
@jogibear9988
jogibear9988 deleted the codex/kcc-v13-followup branch September 22, 2026 22:17
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