Skip to content

Make attachment_user_provided property_id nullable#8228

Merged
jpople merged 4 commits into
mainfrom
jpople/eng-3523/optional-property-id-upload
May 19, 2026
Merged

Make attachment_user_provided property_id nullable#8228
jpople merged 4 commits into
mainfrom
jpople/eng-3523/optional-property-id-upload

Conversation

@jpople
Copy link
Copy Markdown
Contributor

@jpople jpople commented May 18, 2026

Summary

  • Changes property_id column on attachment_user_provided to nullable=True
  • Updates create_uploaded() repository method to accept Optional[str]
  • Adds Alembic migration to drop the NOT NULL constraint

Supports deployments that don't use properties by allowing file uploads without a property context.

Test plan

  • Verify migration runs cleanly (alembic upgrade head)
  • Verify migration rollback works (alembic downgrade -1)
  • Confirm existing uploads with property_id still work

@jpople jpople requested a review from a team as a code owner May 18, 2026 21:53
@jpople jpople requested review from vcruces and removed request for a team May 18, 2026 21:53
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
fides-plus-nightly Ignored Ignored Preview May 19, 2026 2:11pm
fides-privacy-center Ignored Ignored May 19, 2026 2:11pm

Request Review

@jpople jpople requested review from mikeGarifullin and removed request for vcruces May 18, 2026 21:56
jpople added a commit that referenced this pull request May 18, 2026
@mikeGarifullin mikeGarifullin added the db-migration This indicates that a change includes a database migration label May 19, 2026
… head

Both 1e00f8e12f44 and 9f21507db078 had down_revision=9b449105864d,
producing two heads and breaking alembic upgrade in CI.
mypy caught that AttachmentUserProvidedRecord.property_id was still 'str'
after the column became nullable. Also add missing changelog entry.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.64%. Comparing base (aef87c4) to head (f01ba61).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8228   +/-   ##
=======================================
  Coverage   85.64%   85.64%           
=======================================
  Files         661      661           
  Lines       42941    42942    +1     
  Branches     5027     5027           
=======================================
+ Hits        36775    36776    +1     
  Misses       5063     5063           
  Partials     1103     1103           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jpople jpople added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit ea2505e May 19, 2026
69 checks passed
@jpople jpople deleted the jpople/eng-3523/optional-property-id-upload branch May 19, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

db-migration This indicates that a change includes a database migration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants