ENG-1958: Add TCF version hash history table and model#8200
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
7b1affb to
d9be396
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8200 +/- ##
==========================================
+ Coverage 85.63% 85.65% +0.02%
==========================================
Files 661 662 +1
Lines 42942 42969 +27
Branches 5027 5027
==========================================
+ Hits 36773 36805 +32
+ Misses 5064 5060 -4
+ Partials 1105 1104 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fd2f7f5 to
1a9ad6d
Compare
| previous_hash = Column(String, nullable=True) | ||
| current_hash = Column(String, nullable=False, index=True) |
There was a problem hiding this comment.
How do these work for "global" events like Compass sync? what's the current hash if it's not nullable?
There was a problem hiding this comment.
global events like compass sync trigger a re-caching of experiences. The re-caching flow itself already checks if any parts of an experience changed (let me know if that's wrong) and as part of refreshing the cache will re-calculate the hash and track the change per experience config.
1667c19 to
de0ac8f
Compare
Adds the tcf_version_hash_history table (migration + ORM model) to record hash transitions whenever the TCF experience content changes. Tracks tcf_configuration_id (nullable FK to tcf_configuration, SET NULL on delete) so per-config and global (Compass sync) history chains are isolated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> refactor: use privacy_config_experience_id in TCFVersionHashHistory Replaces privacy_experience_id (FK to privacyexperience) with privacy_config_experience_id (FK to privacyexperienceconfig). Tracking at the config level is more meaningful — all experiences under a config get the same TCF hash, so per-config rows avoid duplicates per region. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
de0ac8f to
e4d724b
Compare
Summary
TCFVersionHashHistorySQLAlchemy model to track changes to TCF configuration hashes over timetcf_version_hash_historytable with columns forid,privacy_config_experience_id,previous_hash,current_hash,changed_at, andtrigger_sourceTest plan
alembic upgrade head— verifytcf_version_hash_historytable is createdprivacyexperiencetablepytest --no-cov tests/targeting models/migrations🤖 Generated with Claude Code