Repository navigation
feat(db): add recommendation source account schema - #881
Merged
Merged
Conversation
Contributor
Member
Author
|
The docstring coverage warning applies only to the migration test function. Its name and assertions describe the behavior, and the project avoids comments that repeat code. No public production API changed, so no redundant test docstring is added. The exact-head review reports no actionable findings. |
3 tasks
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.
Migration120 adds
source_account_keyfrom recommendation JSON and a unique index that includes it. The existing eleven-column index remains in place so current writers keep working. Rollback refuses to remove the new key when the old index is absent, and it preserves recommendation payloads.Refs #799. This schema prerequisite leaves source-account collection, source-aware row IDs, consumer identity and exact Archera matching for the later foundation steps. The old index still rejects otherwise identical source variants. Real-account verification remains in #798.
Validation at
fa5ff70b79c7bfb9b5178dcb5a5bd3d3845ede33: pinned Go1.26.9 build, migration race tests, golangci-lint2.10.1 and normal hooks pass. Two source passes and an exact-byte staged review are clean. Independent cold verification passed twice, exercised PostgreSQL17.11 migration119→120→119→120 and direct JSONB/upsert cases, and killed a scratch mutation that lowercased source identity.Native evidence uses synthetic data in fresh owned local PostgreSQL clusters. Both clusters stopped afterward; no live provider or customer database verification is claimed.
Summary by CodeRabbit