Add user-policy associations and Alembic migrations#71
Merged
anth-volk merged 15 commits intoapp-v2-migrationfrom Feb 17, 2026
Merged
Add user-policy associations and Alembic migrations#71anth-volk merged 15 commits intoapp-v2-migrationfrom
anth-volk merged 15 commits intoapp-v2-migrationfrom
Conversation
aaedda3 to
c5f6a03
Compare
3 tasks
f54fefd to
dc511f7
Compare
- Remove .DS_Store, docs/, and supabase/.temp/ from git tracking - Add these patterns to .gitignore - Update test_user_policies.py to include country_id in all tests - Rename test_list_user_policies_filter_by_tax_benefit_model to test_list_user_policies_filter_by_country 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ed0b722 to
90d826d
Compare
Move setup helpers (create_policy, create_user_policy) and constants (US_COUNTRY_ID, UK_COUNTRY_ID) to test_fixtures/fixtures_user_policies.py. Revert accidental supabase/.temp/cli-latest version change. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add extra='forbid' to UserPolicyUpdate so Pydantic returns 422 if clients send fields beyond 'label' (e.g. user_id, policy_id). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The fixtures were passing tax_benefit_model_version_id (a non-existent field, silently ignored by SQLModel) instead of tax_benefit_model_id (now required). Updated create_policy fixture and its 3 call sites. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
anth-volk
approved these changes
Feb 17, 2026
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.
This PR adds user-policy associations and Alembic migration infrastructure.
User-Policy Associations
Endpoints
Alembic Migration Infrastructure
Added Alembic for database migrations:
alembic.iniandalembic/directory (env.py, script.py.mako)0001_initial_schema- base tables (cherry-picked from Anthony's PR feat: Add household support (CRUD, associations, impact analysis) #77)0002_add_user_policies- user_policies table + tax_benefit_model_id on policiesArchived old Supabase SQL migrations now handled by Alembic:
20251229000000_add_parameter_values_indexes.sql20260103000000_add_poverty_inequality.sql20260111000000_add_aggregate_status.sqlNote: When Anthony's PR #77 merges, we'll need an Alembic merge migration to reconcile both branches.