Skip to content

Add missing migration for Partners & AssignedReviewers#4804

Merged
frjo merged 3 commits intomainfrom
fix/add-assignedreviewers-migration
Apr 12, 2026
Merged

Add missing migration for Partners & AssignedReviewers#4804
frjo merged 3 commits intomainfrom
fix/add-assignedreviewers-migration

Conversation

@wes-otf
Copy link
Copy Markdown
Contributor

@wes-otf wes-otf commented Apr 7, 2026

Related to #4790. I missed an edge case where an AssignedReviewer was also a Partner, in which the migrations would fail as the type attribute is protected in the model. This moves all types of partner to reviewer.

Test Steps

  • Ensure AssignedReviewers with type of partner get migrated to reviewer and that all migrations pass successfully.

@wes-otf wes-otf requested a review from frjo April 7, 2026 16:16
@frjo
Copy link
Copy Markdown
Member

frjo commented Apr 7, 2026

Running this:

git switch main
uv run python manage.py migrate
git switch fix/add-assignedreviewers-migration
uv run python manage.py migrate

I get this error:

django.db.migrations.exceptions.InconsistentMigrationHistory: Migration users.0028_remove_partner_group is applied before its dependency funds.0134_change_partner_assigned_reviewers_role on database 'default'.

@frjo
Copy link
Copy Markdown
Member

frjo commented Apr 7, 2026

I think we can make changes to 0028_remove_partner_group.py‎ directly.

The few system that have applied it likely do not have this edgecase so do not need fixes.

Copy link
Copy Markdown
Member

@frjo frjo left a comment

Choose a reason for hiding this comment

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

See comments above.

@wes-otf
Copy link
Copy Markdown
Contributor Author

wes-otf commented Apr 9, 2026

Yeah I had to manually remove 0028_remove_partner_group from the database to get this in but this makes a little more sense, I think it should be good to go!

@wes-otf wes-otf requested a review from frjo April 9, 2026 13:33
@frjo frjo added Type: Maintenance Type: Patch Mini change, used in release drafter labels Apr 10, 2026
@frjo frjo force-pushed the fix/add-assignedreviewers-migration branch from 692c0b1 to a0d04d0 Compare April 12, 2026 15:34
@frjo
Copy link
Copy Markdown
Member

frjo commented Apr 12, 2026

@wes-otf The new function was never run so I did that minor fix. Also fixed so apps.get_model() always was used.

Works well in my testing now.

I think we can do a new release when this is merged in.

@frjo frjo merged commit aea739c into main Apr 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Maintenance Type: Patch Mini change, used in release drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants