Skip to content

Add constraints to ensure integrity for users roles, organizations and grants#2893

Merged
ziv17 merged 1 commit intodata-for-change:devfrom
ziv17:sd-user-table-integrity
Jan 13, 2026
Merged

Add constraints to ensure integrity for users roles, organizations and grants#2893
ziv17 merged 1 commit intodata-for-change:devfrom
ziv17:sd-user-table-integrity

Conversation

@ziv17
Copy link
Collaborator

@ziv17 ziv17 commented Jan 2, 2026

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.31%. Comparing base (b56f7d0) to head (1a0367d).
⚠️ Report is 59 commits behind head on dev.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2893      +/-   ##
==========================================
- Coverage   55.32%   54.31%   -1.01%     
==========================================
  Files         126      128       +2     
  Lines       10783    11598     +815     
==========================================
+ Hits         5966     6300     +334     
- Misses       4817     5298     +481     
Flag Coverage Δ
unittests 54.31% <ø> (-1.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ziv17 ziv17 force-pushed the sd-user-table-integrity branch from 9fb8b51 to 44dacfd Compare January 2, 2026 08:07
@ziv17 ziv17 requested a review from atalyaalon January 2, 2026 08:28
@ziv17 ziv17 force-pushed the sd-user-table-integrity branch from 44dacfd to 1a0367d Compare January 4, 2026 13:36
Copy link
Collaborator

@atalyaalon atalyaalon left a comment

Choose a reason for hiding this comment

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

@ziv17
Looks good.
My only concern was that given the new constrains the migration will fail: FK creation can fail due to data violations.
I consulted with co-pilot (see here the conversation in the md file and the scripts created).

I ran the readonly sql queries in prod and found one violation, and fixed it. I think we're good to go.

@ziv17 ziv17 merged commit 19e75a7 into data-for-change:dev Jan 13, 2026
3 checks passed
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.

3 participants