ENG-2375: Add privacy assessment and answer history store schema#7330
Merged
thabofletcher merged 10 commits intomainfrom Feb 7, 2026
Merged
ENG-2375: Add privacy assessment and answer history store schema#7330thabofletcher merged 10 commits intomainfrom
thabofletcher merged 10 commits intomainfrom
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Contributor
Greptile OverviewGreptile SummaryAdded comprehensive database schema for Privacy Assessment and Answer History Store feature supporting CPRA/DPIA risk assessments. The implementation includes 5 new tables with proper relationships, indexes, and cascade behaviors. Key Changes:
Confidence Score: 5/5
Important Files Changed
|
...alembic/migrations/versions/xx_2026_02_05_1500_b2c3d4e5f6g7_add_privacy_assessment_schema.py
Outdated
Show resolved
Hide resolved
...alembic/migrations/versions/xx_2026_02_05_1500_b2c3d4e5f6g7_add_privacy_assessment_schema.py
Outdated
Show resolved
Hide resolved
Contributor
Author
galvana
approved these changes
Feb 6, 2026
60f0420 to
1392b68
Compare
- AssessmentTemplate with assessment_type field - AssessmentQuestion with requirement_key, requirement_title, group_order for proper grouping - PrivacyAssessment for assessment instances - AssessmentAnswer with current_version_id for version tracking - AnswerVersion for immutable version history - Seed CPRA Risk Assessment template with 20 questions in 10 groups Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…able Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…2c3d4e5f6g7_add_privacy_assessment_schema.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…2c3d4e5f6g7_add_privacy_assessment_schema.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4082079 to
5602653
Compare
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.
Ticket ENG-2375
Description Of Changes
Adds the database schema for the Privacy Assessment and Answer History Store feature. This provides the foundation for CPRA/DPIA risk assessments with version tracking for all answer changes, enabling audit trails and the ability to revert to previous versions.
The schema supports:
Code Changes
src/fides/api/models/privacy_assessment.pywith 5 new SQLAlchemy models:AssessmentTemplate- Versioned templates for assessment typesAssessmentQuestion- Questions with requirement grouping and orderingPrivacyAssessment- Individual assessments linked to systems/declarationsAssessmentAnswer- Answers with current version referenceAnswerVersion- Immutable history of all answer changes with diffssrc/fides/api/db/base.pyto register new models.fides/db_dataset.ymlwith annotations for new tablesSteps to Confirm
nox -s devto start the development environmentdocker exec fides-fides-1 alembic upgrade headassessment_template,assessment_question,privacy_assessment,assessment_answer,answer_versionassessment_templatefor CPRA template andassessment_questionfor 31 questionsnox -s pytest_api -- tests/ops/migration_tests/Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works