fix(db,auth): dedupe migration prefix 041 and fix main compile #227

Merged
David merged 2 commits from fix/pms-293-dedupe-migration-prefix-041 into main 2026-06-13 23:27:05 +02:00
Owner

Two main breakages discovered while merging the Code-Review batch. Both fail the Check job, so every downstream mokosh-server PR is blocked until this lands.

PMS-293 - duplicate migration prefix 041. main carried both 041_rls_cover_tenantless_tables.sql (PMS-258) and 041_portal_setup_tokens.sql (PMS-136); they were authored on separate branches that each picked 041 and the second merge created the collision. check-migration-prefixes.nu fails and sqlx::migrate! rejects duplicate versions. Renumbered the portal migration to 042 (the two migrations touch disjoint tables, so reordering is inert; neither has been applied to a durable environment).

PMS-294 - main does not compile. PMS-192 changed LoginResponse.user to Option<CurrentUser> but did not update the login_with_google mfa_required branch (which arrived from a separate merge), leaving a bare CurrentUser where Option is required. Set it to user: None, matching the password login() mfa_required branch and the documented invariant that the profile is withheld until the second factor is satisfied. CI did not catch this earlier because the migration-prefix check fails first and short-circuits.

#PMS-293
#PMS-294

Two `main` breakages discovered while merging the Code-Review batch. Both fail the `Check` job, so every downstream mokosh-server PR is blocked until this lands. **PMS-293 - duplicate migration prefix 041.** `main` carried both `041_rls_cover_tenantless_tables.sql` (PMS-258) and `041_portal_setup_tokens.sql` (PMS-136); they were authored on separate branches that each picked `041` and the second merge created the collision. `check-migration-prefixes.nu` fails and `sqlx::migrate!` rejects duplicate versions. Renumbered the portal migration to `042` (the two migrations touch disjoint tables, so reordering is inert; neither has been applied to a durable environment). **PMS-294 - main does not compile.** PMS-192 changed `LoginResponse.user` to `Option<CurrentUser>` but did not update the `login_with_google` mfa_required branch (which arrived from a separate merge), leaving a bare `CurrentUser` where `Option` is required. Set it to `user: None`, matching the password `login()` mfa_required branch and the documented invariant that the profile is withheld until the second factor is satisfied. CI did not catch this earlier because the migration-prefix check fails first and short-circuits. #PMS-293 #PMS-294
main carried two 041_* migrations (041_rls_cover_tenantless_tables from
PMS-258 and 041_portal_setup_tokens from PMS-136). check-migration-prefixes.nu
fails on the duplicate and sqlx::migrate! rejects duplicate versions, so every
downstream PR's Check is red. The two migrations touch disjoint tables, so
renumbering portal to 042 is behaviourally inert. Neither has been applied to a
durable environment yet.

#PMS-293
fix(auth): return user: None in login_with_google mfa_required branch
Some checks failed
E2E / Playwright against staging (pull_request) Failing after 15s
Check / fmt + clippy + compile + tests (pull_request) Successful in 3m4s
Create release / Create release from merged PR (pull_request) Has been skipped
2c9c7c305e
PMS-192 changed LoginResponse.user to Option<CurrentUser> but did not update
the login_with_google mfa_required branch, which arrived on main from a
separate merge. main no longer compiled. Set the field to None to match the
password login() mfa_required branch and the documented invariant that the
profile is withheld until the second factor is satisfied.

#PMS-294
David merged commit a49cfbeddc into main 2026-06-13 23:27:05 +02:00
David deleted branch fix/pms-293-dedupe-migration-prefix-041 2026-06-13 23:27:05 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!227
No description provided.